forked from boostcampwm2023/web17_morak
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
75 lines (69 loc) · 1.63 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
version: '3.8'
services:
backend:
build:
dockerfile: app/backend/Dockerfile
environment:
- DATABASE_URL=mysql://${DB_USER}:${DB_PASSWORD}@db:3306/${DB_DATABASE_NAME}
- REDIS_HOST=redis
- MONGO_HOST=mongodb
- DOMAIN=${DOMAIN}
- PORT=${PORT}
depends_on:
- db
- redis
- mongodb
expose:
- "${PORT}"
- "${SOCKET_PORT}"
db:
image: ccxz84/morak-mysql:latest
environment:
- MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
volumes:
- mysql-data:/var/lib/mysql
ports:
- "${DB_PORT}:3306"
redis:
image: redis:alpine
ports:
- "${REDIS_PORT}:6379"
mongodb:
image: ccxz84/morak-mongo:latest
ports:
- "27017:27017"
environment:
- CHAT_USER=${CHAT_USER}
- CHAT_PASSWORD=${CHAT_PASSWORD}
volumes:
- mongo-data:/data/db
nginx:
image: ccxz84/morak-nginx
ports:
- "80:80"
- "443:443"
environment:
- PORT=${PORT}
- SOCKET_PORT=${SOCKET_PORT}
volumes:
- ./nginx.conf.template:/nginx.conf.template:ro
- frontend-dist:/usr/share/nginx/html # Nginx가 정적 파일을 서빙할 경로
command: /bin/sh -c "./nginx-entrypoint.sh /nginx.conf.template"
depends_on:
- backend
frontend-builder:
build:
dockerfile: app/frontend/Dockerfile.product
args:
VITE_SOCKET_URL: ${VITE_SOCKET_URL}
VITE_SOCKET_URL_PATH: ${VITE_SOCKET_URL_PATH}
VITE_API_URL: ${VITE_API_URL}
volumes:
- frontend-dist:/app/dist
command: sh
depends_on:
- nginx
volumes:
mysql-data:
mongo-data:
frontend-dist: