-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
43 lines (40 loc) · 990 Bytes
/
docker-compose.yml
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
version: '3.7'
services:
database:
container_name: mysql_db
image: mysql:8
restart: unless-stopped
env_file:
- .env
ports:
- "3306:3306"
volumes:
- ./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
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:
- database
networks:
- backend_network
networks:
backend_network: