Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
version: '3.8'

services:
db:
image: mysql:8.0
container_name: my-mysql
restart: unless-stopped
restart: always
env_file:
- /home/ubuntu/docker-env.env
environment:
Expand All @@ -15,6 +13,12 @@ services:
- "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
Expand All @@ -23,11 +27,17 @@ services:
depends_on:
- db
environment:
SPRING_DATASOURCE_URL: jdbc:mysql://my-mysql:3306/mydb
SPRING_DATASOURCE_URL: jdbc:mysql://db:3306/mydb
SPRING_DATASOURCE_USERNAME: ${SPRING_DATASOURCE_USERNAME}
SPRING_DATASOURCE_PASSWORD: ${SPRING_DATASOURCE_PASSWORD}
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
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ spring:

jpa:
hibernate:
ddl-auto: update
ddl-auto: none

web:
cors:
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spring:
jpa:
properties:
hibernate:
dialect: org.hibernate.dialect.MySQLDialect
dialect: org.hibernate.dialect.MySQL8Dialect
show_sql: true
format_sql: true
use_sql_comments: true
Expand Down