Last active
November 12, 2020 21:00
-
-
Save tmurphree/a623d56feb29bbc924e81076bda5be30 to your computer and use it in GitHub Desktop.
docker-compose file for postgres with a volume mapped to localhost
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
version: '3.8' | |
# see https://hub.docker.com/_/postgres for information on the environment variables | |
services: | |
database: | |
image: postgres:13.0-alpine | |
restart: always | |
environment: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: example | |
POSTGRES_DB: IMGRATEFULFOR | |
ports: | |
- 5432:5432 | |
volumes: | |
# syntax is 'host-path:container-path:readWriteOrReadOnly' | |
- '/Users/tom/Documents/database-data/im-grateful-for:/var/lib/postgresql/data:rw' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment