Skip to content

Instantly share code, notes, and snippets.

@nikitalarionov
Created May 2, 2018 18:50
Show Gist options
  • Save nikitalarionov/d099416901873e1e8b1fc402491ef960 to your computer and use it in GitHub Desktop.
Save nikitalarionov/d099416901873e1e8b1fc402491ef960 to your computer and use it in GitHub Desktop.
postgre docker-compose example
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