-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
111 lines (104 loc) · 2.6 KB
/
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
version: '3'
volumes:
mysql_data:
driver: local
services:
app:
build: .
image: democracyos/core:latest
command: nodemon
volumes:
- .:/usr/src/app
env_file: .env
ports:
- "3000:3000"
depends_on:
- mongo
- mysql
- keycloak
- traefik
tty: true
labels:
- "traefik.enable=true"
- "traefik.backend=app"
- "traefik.docker.network=back-tier"
- "traefik.frontend.entryPoints=http"
- "traefik.frontend.rule=Host:localhost;PathPrefix:/api"
- "traefik.port=3000"
networks:
- back-tier
traefik:
image: traefik
command: --api --docker
labels:
- "traefik.enable=false"
networks:
- front-tier
- back-tier
ports:
- "8000:80"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
mongo:
image: mongo:3.6
ports:
- 27017:27017
# Optionally mount external data directory
volumes:
- ~/data3.2:/data/db
labels:
- "traefik.enable=false"
networks:
- back-tier
mysql:
image: mysql:5.7
volumes:
- mysql_data:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=keycloak
- MYSQL_USER=keycloak
- MYSQL_PASSWORD=password
networks:
- back-tier
labels:
- "traefik.enable=false"
keycloak:
image: jboss/keycloak
environment:
- DB_VENDOR=MYSQL
- DB_ADDR=mysql
# Same values than the ones declared in mysql service.
- DB_DATABASE=keycloak
- DB_USER=keycloak
- DB_PASSWORD=password
# Change this seetings
- KEYCLOAK_USER=admin # VERY IMPORTANT!
- KEYCLOAK_PASSWORD=Pa55w0rd # VERY IMPORTANT!
# Uncomment the line below if you want to specify JDBC parameters.
# The parameter below is just an example, and it shouldn't be used in production without knowledge.
# It is highly recommended that you read the MySQL JDBC driver documentation in order to use it.
#JDBC_PARAMS: "connectTimeout=30000"
- PROXY_ADDRESS_FORWARDING=true
depends_on:
- mysql
# volumes:
# - ./realm-dev.json:/var/realm-dev.json
# - ./realm-test.json:/var/realm-test.json
ports:
- "4000:8080"
labels:
- "traefik.enable=true"
- "traefik.backend=keycloak"
- "traefik.port=8080"
- "traefik.docker.network=back-tier"
- "traefik.frontend.entryPoints=http"
- "traefik.frontend.rule=Host:localhost;PathPrefix:/auth"
networks:
- back-tier
networks:
front-tier:
driver: bridge
back-tier:
driver: bridge