-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.prod.yml
61 lines (59 loc) · 1.45 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
version: '3'
services:
mysql:
container_name: mysql
image: mysql:latest
environment:
MYSQL_DATABASE: floating
MYSQL_USER: user
MYSQL_PASSWORD: 12345678
MYSQL_ROOT_HOST: '%'
MYSQL_ROOT_PASSWORD: 12345678
TZ: 'Asia/Seoul'
ports:
- "3306:3306"
volumes:
- ./mysql/conf.d:/etc/mysql/conf.d # MySQL 설정 파일 위치
command:
- "mysqld"
- "--character-set-server=utf8mb4"
- "--collation-server=utf8mb4_unicode_ci"
networks:
- floating_network
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s
timeout: 5s
retries: 5
backend:
container_name: backend
image: sandwich5011/groomthon-univ
env_file:
- .env
ports:
- "8080:8080"
depends_on:
mysql:
condition: service_healthy
networks:
- floating_network
nginx:
user: root
container_name: nginx
build:
context: ./nginx
dockerfile: Dockerfile
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf # Nginx 설정 파일
- ../Frontend/build:/usr/share/nginx/html # React 빌드된 정적 파일 위치
- /home/ec2-user/ssl/fullchain.pem:/etc/ssl/certs/fullchain.pem
- /home/ec2-user/ssl/privkey.pem:/etc/ssl/private/privkey.pem
ports:
- "80:80"
- "443:443"
depends_on:
- backend
networks:
- floating_network
networks:
floating_network: