compose/pkg/e2e/testdata/TestFileReferenceOverridesWarning/compose.yaml
Nicolas De Loof 7818712d35 fix(run): warn about ignored uid/gid/mode for a run target scaled to zero
run forces the scale of its target to one, since a container is created
whatever the project says, but the warning looked the service up again in
the project and skipped it when declared with `scale: 0` or
`deploy.replicas: 0`. The per-service check now takes the service
itself, and run hands it the copy it actually creates the container
from. create and up keep skipping services scaled to zero.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-11-05 09:47:51 +01:00

47 lines
970 B
YAML

services:
# `file:` sources are bind-mounted as-is: uid/gid/mode are ignored.
file-refs:
image: alpine
configs:
- source: fileconfig
uid: "1000"
gid: "1000"
mode: 0o440
secrets:
- source: filesecret
uid: "1000"
mode: 0o440
# `content:` / `environment:` sources are copied in: uid/gid/mode are applied.
inline-refs:
image: alpine
configs:
- source: inlineconfig
uid: "1000"
gid: "1000"
mode: 0o440
secrets:
- source: envsecret
uid: "1000"
mode: 0o440
# run-only: scaled to zero, so create/up skip it, yet `run` creates a container.
run-only:
image: alpine
scale: 0
configs:
- source: fileconfig
uid: "1000"
mode: 0o440
configs:
fileconfig:
file: ./myconfig.txt
inlineconfig:
content: hello
secrets:
filesecret:
file: ./mysecret.txt
envsecret:
environment: SECRET_VALUE