Created
March 17, 2023 18:51
-
-
Save AnthonyLzq/4178f8127d84b8ad04b66280a87e075f to your computer and use it in GitHub Desktop.
ProstgreSQL with Docker compose
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
services: | |
postgres: | |
image: postgres:14 | |
restart: always # Change this in case you don't want to restart the image in every system restart | |
ports: | |
- 5432:5432 | |
environment: | |
POSTGRES_DB: ${DB_NAME} | |
POSTGRES_USER: ${DB_USER} | |
POSTGRES_PASSWORD: ${DB_PASSWORD} | |
volumes: | |
- ./db:/var/lib/postgresql/data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment