Figure I'll need this again
This file contains 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.8" | |
services: | |
db: | |
image: "postgres:12" | |
ports: | |
- "54320:5432" | |
volumes: | |
- ./pgdata:/var/lib/postgresql/data | |
environment: | |
- POSTGRES_USER=usrnm | |
- POSTGRES_PASSWORD=passwd | |
- POSTGRES_DB=demo | |
# change vars | |
# rebuild with: | |
# docker-compose up --build --force-recreate -d | |
# enter container: | |
# docker-compose run db bash | |
# enter postgres interpreter: | |
# psql --username=usrnm --dbname=demo --host=db | |
# add .env file | |
# DATABASE_URL="postgresql://usrnm:passwd@localhost:54320/demo" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment