Skip to content

Instantly share code, notes, and snippets.

@jonleopard
Last active May 5, 2020 13:52
Show Gist options
  • Save jonleopard/17bdd5c88f50773b5703341df7f60e10 to your computer and use it in GitHub Desktop.
Save jonleopard/17bdd5c88f50773b5703341df7f60e10 to your computer and use it in GitHub Desktop.
goreddit docker-compose.yml
version: '3.8'
services:
db:
image: postgres
environment:
POSTGRES_DB: mydbname
POSTGRES_USER: mydbuser
POSTGRES_PASSWORD: mydbpwd
ports:
- "5432:5432"
migrate:
image: migrate/migrate
volumes:
- ./migrations:/migrations
depends_on:
- db
command: -source=file://migrations -database postgres://mydbuser:mydbpwd@db:5432/mydbname?sslmode=disable up
adminer:
image: adminer
restart: always
ports:
- "8081:8080"
environment:
ADMINER_DEFAULT_SERVER: db
depends_on:
- db
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment