-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
executable file
·57 lines (50 loc) · 1.03 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
version: "3"
services:
db:
image: mysql:latest
restart: always
ports:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=rootroot
- MYSQL_DATABASE=cloud_native
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
volumes:
- ./mysql/volume/:/docker-entrypoint-initdb.d/
networks:
- cloudNativeNet
backend:
build:
context: ./backend/
dockerfile: Dockerfile
restart: always
ports:
- "8080:8080"
environment:
SPRING_DATASOURCE_URL: jdbc:mysql://db:3306/cloud_native
SPRING_DATASOURCE_USERNAME: root
SPRING_DATASOURCE_PASSWORD: rootroot
depends_on:
- db
networks:
- cloudNativeNet
links:
- db
frontend:
build:
context: ./frontend/
dockerfile: Dockerfile
restart: always
ports:
- "3000:3000"
depends_on:
- backend
networks:
- cloudNativeNet
links:
- backend
networks:
cloudNativeNet:
driver: bridge