api:
image: registry.gitlab.com/ixsecurity/key-server/high-availability/api:latest
deploy:
replicas: 5
restart_policy:
condition: on-failure
ports:
- 80:3000
volumes:
- type: volume
source: secret
target: /credential
volume:
nocopy: true
secrets:
- env
environment:
- DEBUG=key-server-api
depends_on:
- redis
docker stack deploy --compose-file docker-compose.yml [stack] --with-registry-auth