Skip to content

Instantly share code, notes, and snippets.

@jdaarevalo
Last active August 19, 2023 16:24
Show Gist options
  • Save jdaarevalo/f1c02e3531142c61ebfd926a39c46250 to your computer and use it in GitHub Desktop.
Save jdaarevalo/f1c02e3531142c61ebfd926a39c46250 to your computer and use it in GitHub Desktop.
docker_compose_postgres
version: '3.7'
services:
postgres:
image: postgres:10.5
restart: always
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
logging:
options:
max-size: 10m
max-file: "3"
ports:
- '5438:5432'
volumes:
- ./postgres-data:/var/lib/postgresql/data
# copy the sql script to create tables
- ./sql/create_tables.sql:/docker-entrypoint-initdb.d/create_tables.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment