Created
July 16, 2019 00:11
-
-
Save GusAntoniassi/89697b0c1f7a1108cc4ca0dc1eefd75f to your computer and use it in GitHub Desktop.
Postgres com Docker Compose
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: | |
db: | |
image: postgres:11.2 | |
ports: | |
- "5432:5432" | |
volumes: | |
- data:/var/lib/postgresql/data | |
- ./.docker/db/scripts:/docker-entrypoint-initdb.d/ # Opcional, você pode colocar alguns scripts .sh ou SQL para rodar quando o banco inicializar | |
environment: | |
POSTGRES_USER: 'postgres' | |
POSTGRES_DB: 'meu_db' | |
POSTGRES_PASSWORD: 'postgres' | |
tty: true | |
volumes: | |
data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment