Skip to content

Instantly share code, notes, and snippets.

@moinulmoin
Last active November 12, 2023 13:41
Show Gist options
  • Select an option

  • Save moinulmoin/e3694d716eefadd75d7e5be9d33d2ef1 to your computer and use it in GitHub Desktop.

Select an option

Save moinulmoin/e3694d716eefadd75d7e5be9d33d2ef1 to your computer and use it in GitHub Desktop.
docker postgres service
DB_USER=postgres
DB_PASSWORD=postgres
DB_NAME=postgres
DATABASE_URL="postgres://${DB_USER}:${DB_PASSWORD}@localhost:5432/${DB_NAME}"
version: "3"
services:
db:
image: postgres:15.2-alpine
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
ports:
- "5432:5432"
volumes:
- postgres:/var/lib/postgresql/data
volumes:
postgres:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment