Created
September 27, 2021 19:48
-
-
Save WebDevEtc/3c5d1c8c76630b8953424758e210746a to your computer and use it in GitHub Desktop.
docker-compose.yml for running postgres
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: | |
database: | |
image: postgres | |
restart: unless-stopped | |
container_name: database | |
environment: | |
POSTGRES_PASSWORD: secret123 | |
POSTGRES_DB: dbname | |
volumes: | |
- ./postgresql-data:/var/lib/postgresql/data | |
ports: | |
- '5432:5432' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment