-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
95 lines (84 loc) · 2.28 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
version: '3.9'
# Define services
services:
# Database (Mysql)
ad-mysqldb:
image: mysql
ports:
- 3306:3306
restart: unless-stopped
environment:
- MYSQL_DATABASE=GetFitWithHenry
- MYSQL_PASSWORD=root
- MYSQL_ROOT_PASSWORD=password
volumes:
- db-data:/var/lib/mysql
networks:
- ad-network-backend
# Springboot Java backend
ad-backend:
image: gavingyh/ad_backend:latest
ports:
- 8080:8080
depends_on:
- ad-mysqldb
restart: on-failure
environment:
SPRING_APPLICATION_JSON: '{
"spring.mvc.format.date":"dd-MM-yyyy",
"spring.datasource.url":"jdbc:mysql://ad-mysqldb:3306/GetFitWithHenry?autoReconnect=true&useSSL=false&serverTimezone=GMT&createDatabaseIfNotExist=true&allowPublicKeyRetrieval=true",
"spring.datasource.username":"root",
"spring.datasource.password":"password",
"spring.thymeleaf.mode":"HTML",
"spring.session.store-type":"none",
"spring.session.jdbc.initialize-schema":"always",
"spring.jpa.hibernate.ddl-auto":"update",
"spring.jpa.properties.hibernate.dialect":"org.hibernate.dialect.MySQL8Dialect",
"spring.jpa.properties.hibernate.globally_quoted_identifiers":"true",
"spring.jpa.defer-datasource-initialization":"true"
}'
networks:
- ad-network-frontend
- ad-network-backend
# React.js Recipe
ad-react-recipe:
image: gavingyh/ad_react_recipe:latest
ports:
- 3000:3000
restart: unless-stopped
depends_on:
- ad-backend
volumes:
- ./frontend/node_modules:/usr/app/node_modules
- ./frontend:/usr/app
networks:
- ad-network-frontend
# React.js Admin
ad-react-admin:
image: gavingyh/ad_react_admin:latest
ports:
- 3001:3001
restart: unless-stopped
depends_on:
- ad-backend
volumes:
- ./frontend/node_modules:/usr/app/node_modules
- ./frontend:/usr/app
networks:
- ad-network-frontend
# Flask ML api
ad-ml-model:
image: gavingyh/ad_ml_model:latest
ports:
- 5000:5000
depends_on:
- ad-backend
networks:
- ad-network-backend
# Volumes
volumes:
db-data:
# Networks
networks:
ad-network-frontend:
ad-network-backend: