Skip to content

Instantly share code, notes, and snippets.

@GusAntoniassi
Created July 16, 2019 00:11
Show Gist options
  • Save GusAntoniassi/89697b0c1f7a1108cc4ca0dc1eefd75f to your computer and use it in GitHub Desktop.
Save GusAntoniassi/89697b0c1f7a1108cc4ca0dc1eefd75f to your computer and use it in GitHub Desktop.
Postgres com Docker Compose
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