Skip to content

Instantly share code, notes, and snippets.

@AnthonyLzq
Created March 17, 2023 18:51
Show Gist options
  • Save AnthonyLzq/4178f8127d84b8ad04b66280a87e075f to your computer and use it in GitHub Desktop.
Save AnthonyLzq/4178f8127d84b8ad04b66280a87e075f to your computer and use it in GitHub Desktop.
ProstgreSQL with Docker compose
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