-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
63 lines (58 loc) · 1.67 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
62
63
name: demo-petclinic
services:
# Define the base development service for local development and run the
# Contrast Agent in Assess mode by setting CONTRAST__SERVER__ENVIRONMENT to
# Development.
petclinic-dev:
image: petclinic:latest
build:
context: .
dockerfile: Dockerfile
target: contrast
container_name: petclinic-dev
configs:
- source: contrast_agent_config
target: /etc/contrast/java/contrast_security.yaml
environment:
CONTRAST__SERVER__NAME: petclinic-dev-server
CONTRAST__SERVER__ENVIRONMENT: Development
ports:
- 8080:8080
networks:
- petclinic-network
healthcheck:
test: ["CMD", "wget", "http://localhost:8080", "-O", "/dev/null"]
interval: 10s
timeout: 10s
retries: 3
start_period: 20s
# Extend the development service above to create a production service.
# Overwrite CONTRAST__SERVER__ENVIRONMENT to Production to run the Contrast
# Agent in Protect mode.
petclinic-prod:
image: petclinic:latest
build:
context: .
dockerfile: Dockerfile
target: contrast
container_name: petclinic-prod
environment:
CONTRAST__SERVER__NAME: petclinic-prod-server
CONTRAST__SERVER__ENVIRONMENT: Production
ports:
- 8081:8080
networks:
- petclinic-network
healthcheck:
test: ["CMD", "wget", "http://localhost:8080", "-O", "/dev/null"]
interval: 10s
timeout: 10s
retries: 3
start_period: 20s
networks:
petclinic-network:
name: petclinic-network
configs:
contrast_agent_config:
name: contrast_security.yaml
file: ./contrast_security.yaml