-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
37 lines (33 loc) · 891 Bytes
/
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
version: '3.8'
services:
student-frontend:
image: student-frontend:v1
container_name: student-frontend
build:
context: .
dockerfile: frontend/Dockerfile
ports:
- 3000:3000
student-service:
image: student-service:v1
container_name: student-service
build:
context: .
dockerfile: student-service/Dockerfile
depends_on:
- student-database
environment:
- "DATABASE_URL=jdbc:mysql://student-database/student_management?allowPublicKeyRetrieval=true&useSSL=false"
- "DATABASE_USER=root"
- "DATABASE_PASSWORD=root"
ports:
- 8080:8080
student-database:
container_name: student-database
image: mysql:8.0
ports:
- "3306:3306"
environment:
- "MYSQL_ROOT_PASSWORD=root"
volumes:
- ./db-scripts/01-init.sql:/docker-entrypoint-initdb.d/01-init.sql