forked from CEOS-Developers/spring-knowledgeIn-21st
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
41 lines (37 loc) · 756 Bytes
/
docker-compose.yml
File metadata and controls
41 lines (37 loc) · 756 Bytes
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
services:
db:
image: mysql:8.0
ports:
- "3308:3306"
volumes:
- mysql-data:/var/lib/mysql
networks:
- spring-knowledgein-21st_my-network
environment:
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_DATABASE: naver
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s
retries: 5
restart: always
app:
image: doapp
container_name: spring-app
env_file:
- .env
depends_on:
db:
condition: service_healthy
volumes:
- app:/app
ports:
- "8080:8080"
networks:
- spring-knowledgein-21st_my-network
volumes:
mysql-data:
app:
networks:
spring-knowledgein-21st_my-network:
external: true