Files
hamster-tycoon/containers/docker-compose.local.yml
2020-01-05 23:20:38 +01:00

35 lines
865 B
YAML

version: "2.1"
services:
database:
image: postgres:10-alpine
environment:
- POSTGRES_DB=hamster_tycoon
ports:
- "5432"
healthcheck:
test: ["CMD-SHELL", "psql -U postgres -c 'SELECT 1;'"]
interval: 10s
timeout: 30s
retries: 3
liquibase:
image: kilna/liquibase-postgres
depends_on:
database:
condition: service_healthy
links:
- database
environment:
- LIQUIBASE_DATABASE=postgres
- LIQUIBASE_HOST=database
- LIQUIBASE_USERNAME=postgres
- LIQUIBASE_PASSWORD=password
- LIQUIBASE_CHANGELOG=/changelogs/changelog-master.xml
- LIQUIBASE_URL=jdbc:postgresql://database:5432/postgres
volumes:
- $PWD/liquibase/changelogs/:/workspace
command:
- liquibase
- --defaultsFile=/workspace/liquibase.properties
- update