-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
55 lines (54 loc) · 1.32 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
version: '3'
services:
# Database Service (Mysql)
db-server:
image: mysql
environment:
# - MYSQL_DATABASE:kanbandb
# - MYSQL_ROOT_USERNAME=root
- MYSQL_ROOT_PASSWORD=root
# - MYSQL_USER=root
# - MYSQL_PASSWORD=root
volumes:
- ./db-data:/var/lib/mysql
ports:
- 3306:3306
restart: always
networks:
- backend
# App Backend Dervice
app-server:
build:
# ./kanbanboard-apis
context: ./kanbanboard-apis # backend dir
dockerfile: Dockerfile # backend Dockerfile
depends_on:
- db-server
environment:
- spring.datasource.url=jdbc:mysql://db-server:3306/kanbandb?createDatabaseIfNotExist=true&useSSL=false&serverTimezone=UTC&useLegacyDatetimeCode=false&allowPublicKeyRetrieval=true
- spring.datasource.username=root
- spring.datasource.password=root
ports:
- 9000:9000
restart: always
networks:
- backend
- frontend
# Frontend Service
app-client:
build:
# ./kanbanboard-web
context: kanbanboard-web # frontend dir
dockerfile: Dockerfile # frontend Dockerfile
args:
API_BASE_URL: http://127.0.0.1:9000
ports:
- "80:80"
restart: always
depends_on:
- app-server
networks:
- frontend
networks:
backend:
frontend: