Last active
February 12, 2023 15:50
-
-
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.
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
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