-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathdocker-compose.yml
executable file
·114 lines (106 loc) · 2.99 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
version: '3'
services:
# Broker
mongo:
image: mongo:3.4
hostname: mongo
ports:
- "27017:27017"
volumes:
- ./data/mongo:/data/db
healthcheck:
test: echo 'db.stats().ok' | mongo localhost:27017/local --quiet
interval: 5s
timeout: 5s
retries: 12
command: mongod
orion:
image: fiware/orion:2.2.0
hostname: orion
entrypoint: ["sh", "-c", "rm /tmp/contextBroker.pid; /usr/bin/contextBroker -fg -multiservice -dbhost localhost -logLevel DEBUG"]
restart: always
network_mode: host
depends_on:
- "mongo"
waziup-api:
build: ./waziup-api
image: waziup/waziup-api:${PLATFORM_VER}
environment:
- HTTP_PORT=800
- MQTT_PORT=3883
- HTTP_URL=${API_URL}
- KEYCLOAK_URL=${KEYCLOAK_URL}/auth
- ORION_URL=http://localhost:1026
- MONGODB_URL=mongo
- LOG_LEVEL=DEBUG
- MOSQ_URL=mqtt
- MOSQ_PORT=6883
- TWITTER_CONSUMER_KEY=$TWITTER_CONSUMER_KEY
- TWITTER_CONSUMER_SECRET=$TWITTER_CONSUMER_SECRET
- TWITTER_ACCESS_TOKEN=$TWITTER_ACCESS_TOKEN
- TWITTER_ACCESS_TOKEN_SECRET=$TWITTER_ACCESS_TOKEN_SECRET
- PLIVO_ID=$PLIVO_ID
- PLIVO_TOKEN=$PLIVO_TOKEN
- NOTIF_MIN_INTERVAL=0
network_mode: host
restart: always
extra_hosts:
- "orion:127.0.0.1"
- "mongo:127.0.0.1"
- "mqtt:127.0.0.1"
depends_on:
- orion
- keycloak
- mongo
- mqtt
mqtt:
image: waziup/mosquitto
build: ./mosquitto
ports:
- "6883:6883"
- "8083:8083"
# Users identification & authorization
keycloak:
build: ./keycloak
image: waziup/keycloak:${PLATFORM_VER}
ports:
- "8080:8080"
restart: always
environment:
- DB_VENDOR=mysql
- KEYCLOAK_USER=admin
- KEYCLOAK_PASSWORD=${WAZIUP_ADMIN_PASS}
- KEYCLOAK_LOGLEVEL=DEBUG
- MYSQL_PORT_3306_TCP_ADDR=mysql
- MYSQL_PORT_3306_TCP_PORT=3306
volumes:
- ./data/keycloak:/opt/jboss/keycloak/standalone/data/
# If the realm "waziup" doesn't exists, create it from file
#entrypoint: "/opt/jboss/tools/docker-entrypoint.sh -b 0.0.0.0 -Dkeycloak.migration.action=import -Dkeycloak.migration.provider=dir -Dkeycloak.migration.strategy=IGNORE_EXISTING -Dkeycloak.migration.dir=/opt/jboss/keycloak/imports"
depends_on:
- mysql
mysql:
image: mysql:5.7
hostname: mysql
ports:
- "3306:3306"
volumes:
- ./data/mysql:/var/lib/mysql/
environment:
- MYSQL_DATABASE=keycloak
- MYSQL_USER=keycloak
- MYSQL_PASSWORD=password
- MYSQL_ROOT_PASSWORD=root_password
# Dashboard
dashboard:
# Specific images should be built for each environment (local, staging, production).
image: waziup/dashboard:${PLATFORM_VER}-localhost
build:
context: ./dashboard
args:
- SERVER_PORT=3000
- SERVER_URL=${DASHBOARD_URL}
- KEYCLOAK_URL=${KEYCLOAK_URL}/auth
- API_SERVER_URL=${API_URL}/api
ports:
- "3000:3000"