forked from Education-ON/e-on-deployee
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
44 lines (39 loc) · 1.08 KB
/
docker-compose.yml
File metadata and controls
44 lines (39 loc) · 1.08 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
# docker-compose.yml (로컬 개발 및 테스트용)
version: '3.8'
services:
backend:
# image 대신 build를 사용한다.
# './backend' 폴더의 Dockerfile을 읽어서 이미지를 직접 빌드하라는 의미이다.
build: ./backend
container_name: e-on-backend-local
restart: always
ports:
- "4000:4000"
depends_on:
- mysql
# 로컬 테스트용 .env 파일을 사용한다.
env_file:
- ./backend/.env
frontend:
# 프론트엔드도 마찬가지로 직접 빌드한다.
build: ./frontend
container_name: e-on-frontend-local
restart: always
ports:
- "5173:80" # 브라우저 5173 -> Nginx 80
depends_on:
- backend
mysql:
# DB는 공식 이미지를 그대로 가져온다.
image: mysql:8.0
container_name: e-on-mysql-local
restart: always
environment:
MYSQL_ROOT_PASSWORD: ownue
MYSQL_DATABASE: eon_db
MYSQL_USER: eon
MYSQL_PASSWORD: eon
volumes:
- mysql_data:/var/lib/mysql
volumes:
mysql_data: