Last active
August 19, 2023 16:24
-
-
Save jdaarevalo/f1c02e3531142c61ebfd926a39c46250 to your computer and use it in GitHub Desktop.
docker_compose_postgres
This file contains hidden or 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.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