-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
55 lines (49 loc) · 1.24 KB
/
docker-compose.yml
File metadata and controls
55 lines (49 loc) · 1.24 KB
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
services:
# 1. MySQL 데이터베이스
db:
image: mysql:8.0
container_name: rally-mysql
ports:
- "3307:3306" # (내 컴퓨터 포트):(도커 내부 포트)
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: rallytrack
MYSQL_USER: user
MYSQL_PASSWORD: password
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
volumes:
- db_data:/var/lib/mysql
# 2. Backend (Spring Boot)
backend:
build: ../backend # devops 폴더 기준 상위 폴더의 backend 참조
container_name: rally-backend
ports:
- "8080:8080"
depends_on:
- db
networks:
- rally-network
restart: on-failure
# 3. Frontend (React)
frontend:
build: ../frontend # devops 폴더 기준 상위 폴더의 frontend 참조
container_name: rally-frontend
ports:
- "3000:80" # 호스트 3000번 포트로 들어오면 컨테이너 80번(Nginx)으로 연결
depends_on:
- backend
networks:
- rally-network
# 4. AI Server
ai-server:
build: ../aiAnalysis-server
container_name: rally-ai
ports:
- "8000:8000"
networks:
- rally-network
volumes:
db_data:
networks:
rally-network:
driver: bridge