forked from osopromadze/Spring-Boot-Blog-REST-API
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
36 lines (36 loc) · 781 Bytes
/
docker-compose.yml
File metadata and controls
36 lines (36 loc) · 781 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
version: '3.8'
services:
db:
image: mysql
container_name: blogapi-db
restart: always
environment:
MYSQL_DATABASE: 'blogapi'
MYSQL_PASSWORD: 'root'
MYSQL_ROOT_PASSWORD: 'root'
ports:
- '3306:3306'
networks:
- blogapi-network
healthcheck:
test: "/usr/bin/mysql --user=root --password=root --execute \"SHOW DATABASES;\""
interval: 2s
timeout: 20s
retries: 10
volumes:
- ./data:/docker-entrypoint-initdb.d
application:
container_name: blogapi-application
build:
context: ./
dockerfile: Dockerfile
ports:
- "8080:8080"
networks:
- blogapi-network
depends_on:
- "db"
networks:
blogapi-network:
name: blogapi-network
driver: bridge