Skip to content

Commit 104e0e1

Browse files
authored
Merge pull request #83 from HSU-UMC/refactor/cicd
Chore : yml 수정
2 parents dbe8015 + e269fac commit 104e0e1

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

docker-compose.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
version: '3.8'
2-
31
services:
42
db:
53
image: mysql:8.0
64
container_name: my-mysql
7-
restart: unless-stopped
5+
restart: always
86
env_file:
97
- /home/ubuntu/docker-env.env
108
environment:
@@ -15,6 +13,12 @@ services:
1513
- "3306:3306"
1614
volumes:
1715
- db_data:/var/lib/mysql
16+
healthcheck:
17+
test: ["CMD", "mysqladmin", "ping", "--silent"]
18+
interval: 30s
19+
retries: 5
20+
start_period: 5s
21+
timeout: 10s
1822

1923
app:
2024
image: ggamnunq/umc:backend
@@ -23,11 +27,17 @@ services:
2327
depends_on:
2428
- db
2529
environment:
26-
SPRING_DATASOURCE_URL: jdbc:mysql://my-mysql:3306/mydb
30+
SPRING_DATASOURCE_URL: jdbc:mysql://db:3306/mydb
2731
SPRING_DATASOURCE_USERNAME: ${SPRING_DATASOURCE_USERNAME}
2832
SPRING_DATASOURCE_PASSWORD: ${SPRING_DATASOURCE_PASSWORD}
2933
ports:
3034
- "8080:8080"
35+
healthcheck:
36+
test: ["CMD", "curl", "-f", "http://localhost:8080/actuator/health"]
37+
interval: 30s
38+
retries: 5
39+
start_period: 10s
40+
timeout: 10s
3141

3242
nginx:
3343
image: ggamnunq/umc:nginx

src/main/resources/application-dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ spring:
77

88
jpa:
99
hibernate:
10-
ddl-auto: update
10+
ddl-auto: none
1111

1212
web:
1313
cors:

src/main/resources/application-local.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ spring:
1010
jpa:
1111
properties:
1212
hibernate:
13-
dialect: org.hibernate.dialect.MySQLDialect
13+
dialect: org.hibernate.dialect.MySQL8Dialect
1414
show_sql: true
1515
format_sql: true
1616
use_sql_comments: true

0 commit comments

Comments
 (0)