forked from aillamsun/spring-boot-docker-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
48 lines (45 loc) · 978 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
44
45
46
47
48
version : '2'
services:
mysql:
image: mysql:5.6.35
volumes:
- ./mysql/db:/var/lib/mysql
ports:
- 3306:3306
environment:
- MYSQL_ROOT_PASSWORD=123456
service1:
image: java:8
volumes:
- ./java:/opt/app
# expose:
# - 8080
ports:
- 9081:8080
links:
- mysql:mysql
command: java -jar /opt/app/spring-boot-docker-example-1.0.0.jar
service2:
image: java:8
volumes:
- ./java:/opt/app
# expose:
# - 8080
ports:
- 9082:8080
links:
- mysql:mysql
command: java -jar /opt/app/spring-boot-docker-example-1.0.0.jar
nginx1:
image: nginx:latest
volumes:
- ./nginx/html:/usr/share/nginx/html:ro
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/conf.d:/etc/nginx/conf.d:ro
#expose:
# - 80
ports:
- 8088:80
links:
- service1:service1
- service2:service2