-
Notifications
You must be signed in to change notification settings - Fork 23
/
docker-compose.yml
48 lines (43 loc) · 1010 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: "3.3"
services:
client:
image: ideadapt/todomvc-client:latest
networks:
- todonet
server:
image: ideadapt/todomvc-java-server:latest
networks:
- todonet
environment:
# db is the docker-network internal DNS name of the db service
- JDBC_URI=jdbc:mysql://db:3306/todo
db:
image: mysql:8.0
# Uncomment to make database accessible from host system
# ports:
# - 3306:3306
networks:
- todonet
# Variables values have to be set from outside, e.g. via .env file
environment:
- MYSQL_USER
- MYSQL_PASSWORD
- MYSQL_ROOT_PASSWORD
- MYSQL_DATABASE
volumes:
- ./db-data/v1:/docker-entrypoint-initdb.d
# Reverse proxy. The only service with exposed port
web:
image: nginx
depends_on:
- client
- server
networks:
- todonet
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
ports:
- "80:8000"
networks:
todonet:
driver: bridge