-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
171 lines (169 loc) · 5.29 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
version : '3.5'
services:
# ------------------- MONGODB -------------------
mongo:
image: mongo:3.6
container_name: mongoDB
hostname: mongo
command: --nojournal
restart: always
volumes:
- ./mongo-db:/data/db
healthcheck:
test: |
host=`hostname --ip-address || echo '127.0.0.1'`;
mongo --quiet $host/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 2)' && echo 0 || echo 1
# ------------------- ORION CB -------------------
orion:
image: fiware/orion
container_name: fiware-orion-theBelt
hostname: orion
links:
- mongo
deploy:
restart_policy:
condition: on-failure
ports:
- "1026" # not "1026:1026"! dont want it reachable outside container
command: -dbhost mongo
# ------------------- PEP PROXY -------------------
orion-proxy:
image: fiware/pep-proxy:latest
container_name: fiware-orion-PEPproxy
hostname: orion-proxy
networks:
default:
ipv4_address: 172.18.1.10
depends_on:
- keyrock
deploy:
restart_policy:
condition: on-failure
ports:
- "1027:1027"
expose:
- "1027"
environment:
- PEP_PROXY_APP_HOST=orion
- PEP_PROXY_APP_PORT=1026
- PEP_PROXY_PORT=1027
- PEP_PROXY_IDM_HOST=keyrock
- PEP_PROXY_HTTPS_ENABLED=false
- PEP_PROXY_AUTH_ENABLED=false # maybe should be true
- PEP_PROXY_IDM_SSL_ENABLED=false
- PEP_PROXY_IDM_PORT=3005
- PEP_PROXY_APP_ID=0c4035cb-4770-46b7-9808-fe72936a3122 #test app on keyrock
- PEP_PROXY_USERNAME=pep_proxy_15329232-46bb-412e-9bce-00d9350b52ea #admin@test.com
- PEP_PASSWORD=pep_proxy_4a043d9a-e4dc-4fae-a6c2-36a85ad5b0d4 #1234
- PEP_PROXY_PDP=idm
- PEP_PROXY_MAGIC_KEY=1234
- PEP_PROXY_PUBLIC_PATHS=/version #curl testing
healthcheck:
test: curl --fail -s http://orion-proxy:1027/version || exit 1
# ------------------- KEYROCK -------------------
keyrock:
image: fiware/idm:7.6.0
container_name: fiware-keyrock
hostname: keyrock
networks:
default:
ipv4_address: 172.18.1.5
depends_on:
- mysql-db
deploy:
restart_policy:
condition: on-failure
ports:
- '3005:3005'
# - '443:443' #only for mail server
environment:
- DEBUG=idm:*
- IDM_DB_HOST=mysql-db
- IDM_HOST=http://localhost:3005
- IDM_PORT=3005
# Development use only
# Use Docker Secrets for Sensitive Data
- IDM_DB_PASS=secret
- IDM_DB_USER=root
- IDM_ADMIN_USER=admin
- IDM_ADMIN_EMAIL=admin@test.com
- IDM_ADMIN_PASS=1234
# ------------------- MySQL -------------------
mysql-db:
restart: always
image: mysql:5.7
hostname: mysql-db
container_name: db-mysql
expose:
- '3306'
ports:
- '3306:3306'
networks:
default:
ipv4_address: 172.18.1.6
environment:
- 'MYSQL_ROOT_PASSWORD=secret'
- 'MYSQL_ROOT_HOST=172.18.1.5'
volumes:
- ./mysql-db:/var/lib/mysql
# ------------------- Apache -------------------
appDataDB:
image: mongo:3.6
container_name: appDataDB
hostname: appDataDB
command: --nojournal
restart: always
expose:
- '27018'
ports:
- '27018:27017'
networks:
default:
ipv4_address: 172.18.1.18
volumes:
- ./data-db:/data/db
healthcheck:
test: |
host=`hostname --ip-address || echo '127.0.0.1'`;
mongo --quiet $host/test --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 2)' && echo 0 || echo 1
# ------------------- NODE API/frontend -------------------
nodeapp:
image: nodeapp
container_name: nodeAPI
hostname: node
deploy:
restart_policy:
condition: on-failure
ports:
- "80:80"
environment:
- APPPORT=80
- PEP_PROXY_APP_ID=0c4035cb-4770-46b7-9808-fe72936a3122
- PEP_PROXY_APP_SECRET=adf23875-1975-4d02-b59b-2e01bd77388e
- KEYROCK_IP=172.18.1.5
- WILMA_IP=172.18.1.10
- DATA_API_PORT=2000
# ------------------- NODE backend -------------------
nodeDATA:
image: dbapi
container_name: nodeDATA
hostname: dbapi
build:
context: ./dbAPI
dockerfile: ./db.Dockerfile
depends_on:
- appDataDB
deploy:
restart_policy:
condition: on-failure
ports:
- "2000:2000"
environment:
- PORT=2000
- APPDATA_IP=172.18.1.18
# ------------------- GENERAL -------------------
networks:
default:
ipam:
config:
- subnet: 172.18.1.0/24