Created
May 2, 2018 18:50
-
-
Save nikitalarionov/d099416901873e1e8b1fc402491ef960 to your computer and use it in GitHub Desktop.
postgre docker-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
services: | |
web: | |
restart: "no" | |
command: "echo 'web disabled'" | |
backup: | |
restart: "no" | |
command: > | |
bash -c "while ! nc -w 1 -z db 5432; do sleep 0.1; echo 'waiting for db...'; done; | |
sleep 2 && | |
/src/restore.py" | |
environment: | |
- BACKUP=/dump.sql | |
volumes: | |
- ${BACKUP}:/dump.sql | |
db: | |
restart: "no" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment