generated from DEFRA/ffc-template-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.migrate.yaml
46 lines (41 loc) · 1.33 KB
/
docker-compose.migrate.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
x-common-migration: &common-migration
POSTGRES_HOST: ${POSTGRES_HOST:-ffc-pay-processing-postgres}
SCHEMA_ROLE: ${POSTGRES_SCHEMA_ROLE:-postgres}
SCHEMA_USERNAME: ${POSTGRES_SCHEMA_USERNAME:-postgres}
SCHEMA_PASSWORD: ${POSTGRES_SCHEMA_PASSWORD:-ppp}
SCHEMA_NAME: ${POSTGRES_SCHEMA_NAME:-public}
x-common-postgres: &common-postgres
POSTGRES_PORT: 5432
POSTGRES_DB: ${POSTGRES_DB:-ffc_pay_processing}
POSTGRES_PASSWORD: ${POSTGRES_ADMIN_PASSWORD:-ppp}
POSTGRES_USERNAME: ${POSTGRES_ADMIN_USERNAME:-postgres}
services:
database-up:
image: liquibase/liquibase:3.10.x
environment:
<< : [*common-postgres, *common-migration]
entrypoint: >
sh -c "/scripts/migration/database-up"
depends_on:
- ffc-pay-processing-postgres
volumes:
- ./changelog:/liquibase/changelog
- ./scripts:/scripts
database-down:
image: liquibase/liquibase:3.10.x
environment:
<< : [*common-postgres, *common-migration]
entrypoint: >
sh -c "/scripts/migration/database-down"
depends_on:
- ffc-pay-processing-postgres
volumes:
- ./changelog:/liquibase/changelog
- ./scripts:/scripts
ffc-pay-processing-postgres:
image: postgres:11.4-alpine
environment: *common-postgres
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
postgres_data: