Skip to content

Commit

Permalink
Merge branch 'dev' into feat/meeting-agenda-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Starlight258 committed Feb 20, 2024
2 parents 0c6aa2c + 91b584a commit ec84858
Showing 1 changed file with 33 additions and 15 deletions.
48 changes: 33 additions & 15 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,43 @@
version: '3.7'
services:
db:
image: mysql:8-oracle
restart: always
environment:
MYSQL_DATABASE: '{MYSQL_DATABASE}'
MYSQL_USER: '${MYSQL_USER}'
MYSQL_PASSWORD: '${MYSQL_PASSWORD}'
MYSQL_ROOT_PASSWORD: '${MYSQL_ROOT_PASSWORD}'
database:
container_name: mysql_db
image: mysql:8
restart: unless-stopped
env_file:
- .env
ports:
- '3306:3306'
- "3306:3306"
volumes:
- db_data:/var/lib/mysql
- ./mysql/conf.d:/etc/mysql/conf.d
command:
- "mysqld"
- "--character-set-server=utf8mb4"
- "--collation-server=utf8mb4_unicode_ci"
networks:
- backend_network

application:
container_name: backend
deploy:
restart_policy:
condition: on-failure
max_attempts: 5
delay: 3s

app:
image: syw5141/dnd-10th-2-backend:latest
ports:
- "8080:8080"
env_file:
- .env
environment:
SPRING_DATASOURCE_URL: jdbc:mysql://mysql_db:3306/${MYSQL_DATABASE}?useSSL=false&allowPublicKeyRetrieval=true
SPRING_DATASOURCE_USERNAME: ${SPRING_DATASOURCE_USERNAME}
SPRING_DATASOURCE_PASSWORD: ${MYSQL_ROOT_PASSWORD}
depends_on:
- db
- database
networks:
- backend_network

# 볼륨 정의 (기본 설정 사용)
volumes:
db_data:
networks:
backend_network:

0 comments on commit ec84858

Please sign in to comment.