-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
54 lines (51 loc) · 1.2 KB
/
docker-compose.yml
File metadata and controls
54 lines (51 loc) · 1.2 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
services:
db:
image: mysql:8.0
container_name: my-mysql
restart: always
env_file:
- /home/ubuntu/docker-env.env
environment:
MYSQL_ROOT_PASSWORD: examplepw
MYSQL_DATABASE: mydb
TZ: 'Asia/Seoul'
ports:
- "3306:3306"
volumes:
- db_data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "--silent"]
interval: 30s
retries: 5
start_period: 5s
timeout: 10s
app:
image: ggamnunq/umc:backend
container_name: spring-app
restart: always
depends_on:
- db
environment:
SPRING_DATASOURCE_URL: jdbc:mysql://db:3306/mydb/anonymous_board?serverTimezone=UTC&characterEncoding=UTF-8
SPRING_DATASOURCE_USERNAME: user
SPRING_DATASOURCE_PASSWORD: examplepw
ports:
- "8080:8080"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/actuator/health"]
interval: 30s
retries: 5
start_period: 10s
timeout: 10s
nginx:
image: ggamnunq/umc:nginx
container_name: my-nginx
restart: always
ports:
- "80:80"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
depends_on:
- app
volumes:
db_data: