-
Notifications
You must be signed in to change notification settings - Fork 109
/
docker-compose-dev-migrate.yml
63 lines (59 loc) · 2.06 KB
/
docker-compose-dev-migrate.yml
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
version: "3"
services:
postgres:
image: postgres:12
healthcheck:
test: psql postgres --command "select 1" -U postgres
# ports:
# - "5432:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: postgres
volumes:
- ${PWD}/docker/postgres-entrypoint.sh:/docker-entrypoint-initdb.d/init-db.sh
- ${PWD}/docker/pg-dump.sql:/tmp/pg-dump.sql
pact-broker:
build: .
ports:
- "9393:9393"
depends_on:
- postgres
environment:
PACT_BROKER_PORT_ENVIRONMENT_VARIABLE_NAME: PORT
PACT_BROKER_DATABASE_URL_ENVIRONMENT_VARIABLE_NAME: DATABASE_URL
DATABASE_URL: "postgres://postgres:password@postgres/postgres"
PACT_BROKER_DATABASE_BETA_CLEAN_ENABLED: "true"
PACT_BROKER_DATABASE_CLEAN_CRON_SCHEDULE: "* * * * *"
PACT_BROKER_DATABASE_CLEAN_DRY_RUN: "false"
PACT_BROKER_DATABASE_CLEAN_DELETION_LIMIT: "500"
# Keep all prod versions, AND the latest version for every pacticipant/tag, and all versions less than 30 days old
PACT_BROKER_DATABASE_CLEAN_KEEP_VERSION_SELECTORS: '[{"latest": true, "tag": true}, {"max_age": 30}]'
# PACT_BROKER_DATABASE_USERNAME: postgres
# PACT_BROKER_DATABASE_PASSWORD: password
# PACT_BROKER_DATABASE_HOST: postgres
# PACT_BROKER_DATABASE_NAME: postgres
# PACT_BROKER_PORT: "9292"
PORT: '9393'
PACT_BROKER_LOG_LEVEL: INFO
PACT_BROKER_SQL_LOG_LEVEL: DEBUG
PACT_BROKER_DATABASE_CONNECT_MAX_RETRIES: "10"
db-migrate:
build: .
depends_on:
- postgres
environment:
PACT_BROKER_DATABASE_URL: "postgres://postgres:password@postgres/postgres"
PACT_BROKER_LOG_LEVEL: INFO
PACT_BROKER_SQL_LOG_LEVEL: DEBUG
PACT_BROKER_MIGRATION_TARGET: "20200922"
entrypoint: db-migrate
db-version:
build: .
depends_on:
- postgres
environment:
PACT_BROKER_DATABASE_URL: "postgres://postgres:password@postgres/postgres"
PACT_BROKER_LOG_LEVEL: INFO
PACT_BROKER_SQL_LOG_LEVEL: DEBUG
entrypoint: db-version