- dev images are built only when the push touched code that image uses (path filters); webdrop-files does not wait for the frontend build - one v* tag releases both images (:tag and :latest) after the shared checks - registry build and push live in scripts/ci-publish-image.sh, used by every workflow - containers: fix the api Containerfile (missing Sync project), add Containerfile.files, Quadlet units for the file service (prod and dev), env examples, and registry auto-update for the production units so each machine pulls only the image it runs
32 lines
929 B
INI
32 lines
929 B
INI
[Unit]
|
|
Description=WebDrop API with embedded frontend
|
|
Wants=network-online.target
|
|
After=network-online.target
|
|
|
|
[Container]
|
|
ContainerName=webdrop
|
|
# 正式环境:跟踪打 v* tag 发布的 latest。podman-auto-update.timer 每隔几分钟检查 registry,有新镜像就拉取并重启这个单元
|
|
Image=registry.oeo.one/justme/webdrop-api:latest
|
|
Pull=missing
|
|
AutoUpdate=registry
|
|
PublishPort=127.0.0.1:5000:5000
|
|
Environment=ASPNETCORE_URLS=http://+:5000
|
|
Environment=WebDrop__DataDir=/data
|
|
Environment=DOTNET_EnableDiagnostics=0
|
|
# 机器上的配置(文件服务的地址和共用密钥等),不进仓库。例子见 webdrop.env.example
|
|
EnvironmentFile=-%h/podman/webdrop/webdrop.env
|
|
Volume=%h/podman/webdrop/data:/data:Z,U
|
|
ReadOnly=true
|
|
ReadOnlyTmpfs=false
|
|
Tmpfs=/tmp:rw,noexec,nosuid,size=16m
|
|
DropCapability=ALL
|
|
NoNewPrivileges=true
|
|
|
|
[Service]
|
|
Restart=always
|
|
TimeoutStartSec=120
|
|
TimeoutStopSec=60
|
|
|
|
[Install]
|
|
WantedBy=default.target
|