compose/tests/composefiles/aci_secrets_resources/compose.yml
Guillaume Tardif 2ac61a0f7f Deploy e2e compose stack with health check and validate it restarts failed container
Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
2020-11-10 14:04:58 +01:00

46 lines
912 B
YAML

services:
web1:
build: ./web
image: dockerinternal/e2e_test_secret_server
ports:
- "80:80"
secrets:
- source: mysecret1
target: mytarget1
- mysecret2
deploy:
restart_policy:
condition: on-failure
resources:
limits:
cpus: '0.7'
memory: 1G
reservations:
cpus: '0.5'
memory: 0.5G
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:80/healthz"]
interval: 5s
web2:
build: ./web
image: dockerinternal/e2e_test_secret_server
ports:
- "8080:8080"
environment:
- PORT=8080
deploy:
restart_policy:
condition: on-failure
resources:
reservations:
cpus: '0.5'
memory: 0.7G
secrets:
- mysecret2
secrets:
mysecret1:
file: ./my_secret1.txt
mysecret2:
file: ./my_secret2.txt