Skip to content

Instantly share code, notes, and snippets.

@tkim90
Forked from onjin/docker-compose.yml
Last active September 6, 2019 18:35
Show Gist options
  • Select an option

  • Save tkim90/4313a04fd16e1dd24282e135d4b30379 to your computer and use it in GitHub Desktop.

Select an option

Save tkim90/4313a04fd16e1dd24282e135d4b30379 to your computer and use it in GitHub Desktop.
example docker compose for postgresql with db init script
postgres:
image: postgres:9.4
volumes:
# running multiple files
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
- ./schema.sql:/docker-entrypoint-initdb.d/1-schema.sql
- ./data.sql:/docker-entrypoint-initdb.d/2-data.sql
create table sometable(id int);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment