Created
April 4, 2018 20:51
-
-
Save vovimayhem/c06338b3c8b4f2c0ec308c740d1cfcd4 to your computer and use it in GitHub Desktop.
compose-example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: "3.4" | |
| volumes: | |
| postgres-data: | |
| services: | |
| postgres: | |
| image: postgres:10.3-alpine | |
| volumes: | |
| - postgres-data:/var/lib/postgresql/data | |
| environment: | |
| POSTGRES_PASSWORD: 3x4mpl3 | |
| deploy: | |
| placement: | |
| constraints: [node.role == manager] | |
| web: | |
| image: vovimayhem/real-world-backend-django | |
| ports: | |
| - published: 5000 | |
| target: 8000 | |
| depends_on: | |
| - postgres | |
| environment: | |
| DATABASE_URL: postgres://postgres:3x4mpl3@postgres:5432/demo_development | |
| deploy: | |
| replicas: 2 | |
| update_config: | |
| parallelism: 2 | |
| restart_policy: | |
| condition: on-failure |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment