Skip to content

Instantly share code, notes, and snippets.

@wshihadeh
Created December 13, 2019 15:47
Show Gist options
  • Save wshihadeh/c9efe1c0aa7737a050bdbd78186a3fce to your computer and use it in GitHub Desktop.
Save wshihadeh/c9efe1c0aa7737a050bdbd78186a3fce to your computer and use it in GitHub Desktop.
Swarm Mysql stack
version: '3.7'
networks:
platform:
external: true
services:
mysql:
image: ${MYSQL_DOCKER_IMAGE}:${MYSQL_DOCKER_IMAGE_TAG}
volumes:
- ${MYSQL_VOLUME}:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=dummy
deploy:
replicas: 1
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 10
update_config:
failure_action: rollback
parallelism: 1
delay: 10s
order: start-first
rollback_config:
parallelism: 0
order: stop-first
logging:
driver: 'json-file'
options:
"max-size": "10m"
"max-file": "5"
networks:
- platform
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment