-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
60 lines (57 loc) · 1.52 KB
/
docker-compose.yml
File metadata and controls
60 lines (57 loc) · 1.52 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
56
57
58
59
60
services:
# 백엔드 Blue (기본)
backend-blue:
image: ghcr.io/${GITHUB_REPOSITORY}:${IMAGE_TAG:-latest} # GHCR 이미지 사용
container_name: eduops-backend-blue
ports:
- '4000:4000'
env_file:
- .env
volumes:
- ./.env:/app/.env
- /certs/global-bundle.pem:/certs/global-bundle.pem:ro
environment:
- NODE_ENV=production
- PORT=4000
networks:
- lms-network
restart: always #Prisma 마이그레이션 실행 후 서버 시작
profiles:
- blue
# 배포 시에만 실행(포트 4001)
backend-green:
image: ghcr.io/${GITHUB_REPOSITORY}:${IMAGE_TAG:-latest} # GHCR 이미지 사용
container_name: eduops-backend-green
ports:
- '4001:4000'
env_file:
- .env
volumes:
- ./.env:/app/.env
- /certs/global-bundle.pem:/certs/global-bundle.pem:ro
environment:
- NODE_ENV=production
- PORT=4000
networks:
- lms-network
restart: always #Prisma 마이그레이션 실행 후 서버 시작
profiles:
- green # 기본적으로 실행 되지않음
# Nginx Reverse Proxy
nginx:
image: nginx:alpine
container_name: eduops-nginx
ports:
- '80:80'
- '443:443'
volumes:
- ./nginx/conf.d:/etc/nginx/conf.d
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- /etc/letsencrypt:/etc/letsencrypt:ro #( 인증서 read전용)
- ./nginx/logs:/var/log/nginx
networks:
- lms-network
restart: always
networks:
lms-network:
driver: bridge