-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
89 lines (84 loc) · 2.06 KB
/
docker-compose.yaml
File metadata and controls
89 lines (84 loc) · 2.06 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
services:
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: frontend
restart: always
ports:
- 80:80
- 443:443
volumes:
- /home/ubuntu/S12P11E103/work_dir/conf.d/default.conf:/etc/nginx/conf.d/default.conf
- /home/ubuntu/S12P11E103/work_dir/certbot:/var/www/certbot
- /etc/letsencrypt:/etc/letsencrypt:ro
healthcheck:
test: ["CMD", "nginx", "-t"]
interval: 10s
timeout: 10s
retries: 3
spring-boot:
user: "root"
build:
context: ./backend
dockerfile: Dockerfile
container_name: spring-boot
restart: unless-stopped
volumes:
- /etc/letsencrypt:/etc/letsencrypt:ro
ports:
- 8076:8076
environment:
- SPRING_PROFILES_ACTIVE=prod
- JAVA_OPTS=-Xms512m -Xmx1024m
- TZ=Asia/Seoul
networks:
- my-sql-network
- redis-network
depends_on:
mysql:
condition: service_healthy
mysql:
image: mysql:8.0
container_name: mysql
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: "root"
MYSQL_DATABASE: "E103_DB"
TZ: Asia/Seoul
ports:
- 3307:3306
volumes:
- my-sql-volume:/var/lib/mysql
- /home/ubuntu/S12P11E103/db/config/my.cnf:/etc/mysql/conf.d/my.cnf
- /home/ubuntu/S12P11E103/db:/docker-entrypoint-initdb.d
- /etc/localtime:/etc/localtime:ro
networks:
- my-sql-network
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "mysql", "-uroot", "-proot"]
interval: 10s
retries: 5
start_period: 10s
redis:
image: docker.io/redis:7.4.1-alpine
platform: linux/amd64
container_name: redis
restart: unless-stopped
ports:
- 6379:6379
volumes:
- redis:/data
command: >
redis-server
--bind 0.0.0.0
networks:
- redis-network
volumes:
my-sql-volume:
redis:
networks:
my-sql-network:
driver: bridge
redis-network:
driver: bridge