-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
61 lines (58 loc) · 1.65 KB
/
docker-compose.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
services:
wiremock:
image: local.wiremock.cdrapi
container_name: wiremock-cdr-client
build: ./wiremock
mem_limit: 256m
healthcheck:
# use a mapped URL for health checking; the response is a 200 OK with a string body "OK"
test: curl --fail http://localhost:8080/health || exit 1
interval: 5s
retries: 5
start_period: 5s
timeout: 10s
ports:
- "9090:8080"
environment:
- TZ=Europe/Zurich
command: ["--verbose", "--https-port", "8443", "--global-response-templating"]
networks:
- cdr_client_net
mock-oauth2-server:
image: ghcr.io/navikt/mock-oauth2-server:2.1.10
container_name: mock-oauth2-server-cdr-client
environment:
- TZ=Europe/Zurich
- LOG_LEVEL=DEBUG
- JSON_CONFIG_PATH=/app/config.json
- SERVER_PORT=8080
volumes:
- ./mockOAuth2Server/config.json:/app/config.json
- ./mockOAuth2Server/mockoauth2server.p12:/app/mockoauth2server.p12
networks:
- cdr_client_net
caddy:
depends_on:
wiremock:
condition: service_healthy
image: local.caddy.cdrclient
container_name: caddy-cdr-client
build: ./caddy
mem_limit: 256m
ports:
- "8443:8443"
healthcheck:
# checks the mock-oauth2-server's health endpoint to prove that both caddy and the mock-oauth2-server are up and running
test: curl --insecure --fail https://localhost:8443/isalive || exit 1
interval: 5s
retries: 5
start_period: 120s
timeout: 10s
networks:
- cdr_client_net
networks:
cdr_client_net:
name: cdr_client_net
ipam:
config:
- subnet: 10.113.0.0/16