forked from seschis/spring-petclinic
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml
76 lines (72 loc) · 2.13 KB
/
docker-compose.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
64
65
66
67
68
69
70
71
72
73
74
75
76
version: "3.1"
services:
db-1:
image: mysql:8.0
# mapping this port just incase people want to only run the DB as a docker
# container and run the petclinic app manually.
ports:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=
- MYSQL_ALLOW_EMPTY_PASSWORD=true
# Disabling docker profile because for a demo we are only ever using the mysql db.
# profiles:
# - mysql
volumes:
# initialize the mysql dbs and users for the petclinic app. The petclinic app
# itself will handle initializing the database tables and schemas along with
# initial sample data population.
- ./WebApplication/src/main/resources/db/mysql/user.sql:/docker-entrypoint-initdb.d/a-init.sql
# needed so that 'petclinic-app' doesn't start until the DB service is ready
healthcheck:
test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost" ]
timeout: 5s
retries: 30
email-service:
environment:
CONTRAST__SERVER__NAME: "Petclinic"
CONTRAST__APPLICATION__NAME: "Email-Service"
CONTRAST__ASSESS__ENABLE: "true"
CONTRAST__PROTECT__ENABLE: "true"
CONTRAST__OBSERVE__ENABLE: "true"
build:
context: ./
dockerfile: EmailService/Dockerfile
ports:
- 8081:8081
- 5005:5005
log4shell-service:
container_name: Log4ShellServer
build:
context: Log4ShellServer/
dockerfile: Dockerfile
ports:
- 8082:8082
- 1389:1389
petclinic-app:
environment:
CONTRAST__SERVER__NAME: "Petclinic"
CONTRAST__APPLICATION__NAME: "Web-Application"
CONTRAST__ASSESS__ENABLE: "true"
CONTRAST__PROTECT__ENABLE: "true"
CONTRAST__OBSERVE__ENABLE: "true"
image: local/petclinic:latest
container_name: petclinic-app
build:
context: ./
dockerfile: WebApplication/Dockerfile
ports:
- "8080:8080"
depends_on:
db-1:
condition: service_healthy
# postgres:
# image: postgres:15.3
# ports:
# - "5432:5432"
# environment:
# - POSTGRES_PASSWORD=petclinic
# - POSTGRES_USER=petclinic
# - POSTGRES_DB=petclinic
# profiles:
# - postgres