-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
25 lines (24 loc) · 885 Bytes
/
docker-compose.yml
File metadata and controls
25 lines (24 loc) · 885 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
version: "3"
services:
springboot-app: # Name for this application as for one app
container_name: rest-demo-container # Container names
image: rest-demo-app # Used to write this image
restart: always
build: . # This can be used to build docker image. This docker file will used build docker image
ports:
- 8080:8080
environment:
MYSQL_HOST: mysqldb # When same name, docker will create under same network
MYSQL_USER: root
MYSQL_PASSWORD: root
MYSQL_PORT: 3306
depends_on: # Ensure db running first before springboot app
- mysqldb
mysqldb: # When same name, docker will create under same network
container_name: mysqldb # When same name, docker will create under same network
image: mysql
ports:
- 3307:3306
environment:
MYSQL_DATABASE: user_rest_demo
MYSQL_ROOT_PASSWORD: root