Skip to content

Instantly share code, notes, and snippets.

@kauefraga
Last active February 12, 2023 15:50
Show Gist options
  • Save kauefraga/3074c770c789e9faff46b31ff23e8d8d to your computer and use it in GitHub Desktop.
Save kauefraga/3074c770c789e9faff46b31ff23e8d8d to your computer and use it in GitHub Desktop.
πŸ‹ A simple docker-compose file to up a container with bitnami/postgresql image.
version: '3'
services:
postgres:
image: 'bitnami/postgresql'
restart: 'always'
environment:
POSTGRES_USER: 'docker'
POSTGRES_DATABASE: 'postgres'
ports:
- '5432:5432'
volumes:
- 'postgresql_data:/bitnami/postgresql'
env_file:
- '.env'
volumes:
postgresql_data:
driver: local
# database url ex.: postgresql://USER:PASSWORD@HOST:PORT/DB
# .env -> DATABASE_URL="postgresql://postgres:1234@localhost:5432/postgres"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment