Skip to content

Instantly share code, notes, and snippets.

@allomov
Created July 11, 2017 15:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save allomov/1fd146ac559bd518d8e415dbe8359520 to your computer and use it in GitHub Desktop.
Save allomov/1fd146ac559bd518d8e415dbe8359520 to your computer and use it in GitHub Desktop.
version: '3.1'
services:
db:
image: postgres
environment:
POSTGRES_PASSWORD: example
dump-restorer:
image: postgres
command:
["psql", "-h", "db", "-U", "postgres", "-W", "example", "<", "/root/dumps/latest.yml"]
links:
- db
volumes:
- .:/root/dumps
docker run --name test-postgres -e POSTGRES_PASSWORD=mysecretpassword -t -i postgres bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment