Created
August 7, 2019 11:26
-
-
Save kerren/276594df06c930e7a12a5cdd4c190b13 to your computer and use it in GitHub Desktop.
A Docker Compose file that uses wait
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.6' | |
| services: | |
| database: | |
| image: postgres | |
| environment: | |
| - POSTGRES_PASSWORD=testing | |
| - POSTGRES_USER=testing | |
| - POSTGRES_DB=testing | |
| ports: | |
| - 5432 | |
| expose: | |
| - 5432 | |
| networks: | |
| - testing-network | |
| redis: | |
| image: redis | |
| ports: | |
| - 6379 | |
| expose: | |
| - 6379 | |
| networks: | |
| - testing-network | |
| backend: | |
| build: | |
| context: ../../../backend/ | |
| dockerfile: $PWD/Dockerfile | |
| ports: | |
| - 3000 | |
| environment: | |
| - DB_USERNAME=testing | |
| - DB_PASSWORD=testing | |
| - DB_DATABASE=testing | |
| - DB_HOST=database | |
| - REDIS_HOST=redis | |
| - WAIT_HOSTS: database:3306, redis:6379 | |
| - WAIT_HOSTS_TIMEOUT: 300 | |
| depends_on: | |
| - database | |
| - redis | |
| networks: | |
| - testing-network | |
| networks: | |
| testing-network |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment