Skip to content

Instantly share code, notes, and snippets.

@Mon4ik
Last active July 26, 2023 08:54
Show Gist options
  • Save Mon4ik/7854deee36ebec7613c099d19868effe to your computer and use it in GitHub Desktop.
Save Mon4ik/7854deee36ebec7613c099d19868effe to your computer and use it in GitHub Desktop.
Docker compose file for PostgreSQL
version: '3.9'
services:
postgres:
image: 'postgres'
env_file:
- .env
ports:
- '5431:5432' # EXPOSED ON PORT 5431!!!
volumes:
- postgres-data:/var/lib/postgresql/data
volumes:
postgres-data:
POSTGRES_DB=database-name
POSTGRES_USER=admin
POSTGRES_PASSWORD=password
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment