-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-prod.yml
74 lines (66 loc) · 1.77 KB
/
docker-compose-prod.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
version: '3.8'
services:
nginx:
image: nginx:latest
container_name: nginx-server
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- ./frontend/dist:/static
# SSL 설정
- ./fullchain.pem:/ssl/fullchain.pem
- ./privkey.pem:/ssl/privkey.pem
betting_duck_app:
image: node:22.11.0-alpine
container_name: betting_duck_app
working_dir: /app/backend
volumes:
- ./:/app
ports:
- "${SERVER_PORT}:3000"
# 배포용 커맨드
command: >
sh -c " npm install -g pnpm && \
cd ../backend && pnpm install && \
pnpm run start "
environment:
POSTGRES_HOSTNAME: ${POSTGRES_HOSTNAME}
POSTGRES_PORT: ${POSTGRES_PORT}
POSTGRES_DB_NAME: ${POSTGRES_DB_NAME}
POSTGRES_USERNAME: ${POSTGRES_USERNAME}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB_NAME_DB_SYNCHRONIZE: ${POSTGRES_DB_NAME_DB_SYNCHRONIZE}
REDIS_HOSTNAME: ${REDIS_HOSTNAME}
REDIS_PORT: ${REDIS_PORT}
frontend_builder:
image: node:22.11.0-alpine
container_name: frontend_builder
working_dir: /app/frontend
volumes:
- ./:/app
command: >
sh -c " npm install -g pnpm && \
pnpm install && \
pnpm run build "
postgres_db:
image: postgres:15
container_name: postgres_db
environment:
POSTGRES_USER: ${POSTGRES_USERNAME}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB_NAME}
ports:
- "${POSTGRES_PORT}:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
redis:
image: redis:latest
container_name: redis
ports:
- "${REDIS_PORT}:6379"
volumes:
- ./redis.conf:/usr/local/etc/redis/redis.conf
volumes:
postgres_data: