forked from pact-foundation/pact-broker-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-clean.yml
39 lines (36 loc) · 1.27 KB
/
docker-compose-clean.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
version: "3"
services:
postgres:
image: postgres:12
healthcheck:
test: psql postgres --command "select 1" -U postgres
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:
image: pactfoundation/pact-broker:2.79.1.1
ports:
- "9393:9393"
depends_on:
- postgres
environment:
PACT_BROKER_DATABASE_URL: "postgres://postgres:password@postgres/postgres"
PACT_BROKER_DATABASE_CONNECT_MAX_RETRIES: "5"
clean:
build: .
depends_on:
- postgres
environment:
PACT_BROKER_DATABASE_URL: "postgres://postgres:password@postgres/postgres"
PACT_BROKER_DATABASE_CONNECT_MAX_RETRIES: "5"
PACT_BROKER_DATABASE_CLEAN_DELETION_LIMIT: "500"
PACT_BROKER_SQL_LOG_WARN_DURATION: "60"
# 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_LOG_LEVEL: INFO
PACT_BROKER_SQL_LOG_LEVEL: DEBUG
entrypoint: clean