forked from DevProjectsForDevOps/StudentCoursesRestAPI
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
47 lines (44 loc) · 881 Bytes
/
docker-compose.yaml
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
44
45
46
47
---
version: "3"
services:
student-srv:
build:
context: .
networks:
- students-net
- students-private-net
ports:
- target: 8080
published: 8080
protocol: tcp
mode: host
environment:
- MYSQL_SERVER=students-db
depends_on:
- students-db
students-db:
image: mysql:5.6
networks:
- students-private-net
environment:
- MYSQL_ROOT_PASSWORD=password
- MYSQL_DATABASE=test
- MYSQL_USER=directdevops
- MYSQL_PASSWORD=directdevops
volumes:
- type: volume
source: students-db
target: /var/lib/mysql
volumes:
students-db:
networks:
students-net:
driver: bridge
ipam:
config:
- subnet: 192.168.101.0/24
students-private-net:
driver: bridge
ipam:
config:
- subnet: 192.168.102.0/24