-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathdocker-compose-dev.yml
233 lines (220 loc) · 7.82 KB
/
docker-compose-dev.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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
version: '3.4'
services:
mongo:
image: mongo
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_ROOT_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_ROOT_PASSWORD}
volumes:
- ./hermod-python/mongo_data:/data/db
ports:
- 27017:27017
mongo-express:
image: mongo-express
restart: always
ports:
- 8081:8081
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: ${MONGO_ROOT_USERNAME}
ME_CONFIG_MONGODB_ADMINPASSWORD: ${MONGO_ROOT_PASSWORD}
# duckling
duckling:
image: rasa/duckling
restart: always
container_name: duckling
#ports:
#- 8000:8000
# mqtt
mqtt:
image: syntithenai/hermod-python
restart: always
#build: ./hermod-python/
container_name: mqtt
#entrypoint: ['sleep','500000']
entrypoint: ['python','/app/src/hermod.py','-m']
environment:
# see volume mount below
SSL_CERTIFICATES_FOLDER: /etc/letsencrypt/live/${SSL_DOMAIN_NAME}
SSL_DOMAIN_NAME: ${SSL_DOMAIN_NAME}
SSL_EMAIL: ${SSL_EMAIL}
# root user and password to be created on startup
MQTT_USER: ${MQTT_USER}
MQTT_PASSWORD: ${MQTT_PASSWORD}
ports:
- 9001:9001
# expose for logging
- 1883:1883
volumes:
# mount certificates folder
#- ./hermod-python/certs:/app/certs
- /etc/letsencrypt:/etc/letsencrypt
# dev mount src
- ./hermod-python/src:/app/src
# share mosquitto files via host mount for password updates
- ./hermod-python/mosquitto:/etc/mosquitto
# hermod
hermod:
image: syntithenai/hermod-python
depends_on:
- mqtt
#build: ./hermod-python/
container_name: hermodpython
#entrypoint: ['sleep','500000']
entrypoint: ['python','../src/hermod.py','-d','-w','-a','-nl']
working_dir: '/app/rasa'
restart: always
privileged: true
ports:
- ${HTTP_PORT}:80
- ${HTTPS_PORT}:443
# dev npm server
- 3000:3000
environment:
MQTT_HOSTNAME: ${MQTT_HOSTNAME}
MQTT_USER: ${MQTT_USER}
MQTT_PASSWORD: ${MQTT_PASSWORD}
MQTT_PORT: 1883
# disabled to force local RASA
RASA_MODEL: ${RASA_MODEL}
RASA_URL: ${RASA_URL}
HERMOD_KEEP_LISTENING: ${HERMOD_KEEP_LISTENING}
DEEPSPEECH_MODELS: /app/deepspeech-models
DUCKLING_URL: http://duckling:8000
RASA_ACTIONS_URL: http://localhost:5055/webhook
# for logging
MONGO_CONNECTION_STRING: ${MONGO_CONNECTION_STRING}
MNEMO_CONNECTION_STRING: ${MNEMO_CONNECTION_STRING}
# defaults. to change, use mosquitto_password to edit hermod-python/mosquitto/password and mosquitto/acl
# MQTT_PORT: hermod_server
# MQTT_USER: hermod_server
# MQTT_PASSWORD: hermod
# BY DEFAULT LOCAL AUDIO IS DISABLED, SEE entrypoint, environment and volumes to enable
# ENABLE PULSE AUDIO
PULSE_SERVER: ${PULSE_SERVER}
PULSE_COOKIE: /tmp/cookie
# if pulse is not available, it is possible to set the sound devices directly
# note that the microphone device needs to deliver 16K 1channel audio
# MICROPHONE_DEVICE: dmix
# SPEAKER_DEVICE: dmix
# to enable google high quality ASR create and download service account credentials for a project with speech to text enabled
GOOGLE_APPLICATION_CREDENTIALS: ${GOOGLE_APPLICATION_CREDENTIALS}
GOOGLE_APPLICATION_LANGUAGE: ${GOOGLE_APPLICATION_LANGUAGE}
GOOGLE_ENABLE_ASR: ${GOOGLE_ENABLE_ASR}
GOOGLE_ENABLE_TTS: ${GOOGLE_ENABLE_TTS}
IBM_SPEECH_TO_TEXT_APIKEY: ${IBM_SPEECH_TO_TEXT_APIKEY}
IBM_SPEECH_TO_TEXT_REGION: ${IBM_SPEECH_TO_TEXT_REGION}
GOOGLE_OAUTH_CLIENT_ID: ${GOOGLE_OAUTH_CLIENT_ID}
GOOGLE_OAUTH_CLIENT_SECRET: ${GOOGLE_OAUTH_CLIENT_SECRET}
GITHUB_OAUTH_CLIENT_ID: ${GITHUB_OAUTH_CLIENT_ID}
GITHUB_OAUTH_CLIENT_SECRET: ${GITHUB_OAUTH_CLIENT_SECRET}
# enable SSL
SSL_CERTIFICATES_FOLDER: /etc/letsencrypt/live/${SSL_DOMAIN_NAME}
#SSL_CERTIFICATES_FOLDER: /app/certs
SSL_DOMAIN_NAME: ${SSL_DOMAIN_NAME}
SSL_EMAIL: ${SSL_EMAIL}
GOOGLE_ANALYTICS_CODE: ${GOOGLE_ANALYTICS_CODE}
ADSENSE_KEY: ${ADSENSE_KEY}
ADSENSE_SLOT: ${ADSENSE_SLOT}
YOUTUBE_API_KEY: ${YOUTUBE_API_KEY}
UNSPLASH_ACCESS_KEY: ${UNSPLASH_ACCESS_KEY}
volumes:
# map in host localtime
- /etc/localtime:/etc/localtime:ro
# dev mount src
- ./hermod-python/src:/app/src
# dev mount rasa model
- ./hermod-python/rasa:/app/rasa
# access to pulse audio cookie from the host
- ${HOME}/.config/pulse/cookie:/tmp/cookie
# if not using pulse, you need to set environment variables MICROPHONE_DEVICE and SPEAKER_DEVICE
- /dev/snd:/dev/snd
# api credentials
- ${HOME}/secrets/hermod-service-account.json:/app/secrets/googlecredentials.json
# volume mount certificates folder
- /etc/letsencrypt:/etc/letsencrypt
#- ./hermod-python/certs:/app/certs
# dev mount src
- ./hermod-python/www:/app/www
# allow web service to updated mosquitto passwords
- ./hermod-python/mosquitto:/etc/mosquitto
# host tts cache for streaming via web server for web client
- ./tts_cache:/app/www/tts
# TTS service generates files in fixed path /tmp/tts_cache
- ./tts_cache:/tmp/tts_cache
# hermod web server
#hermodweb:
#image: syntithenai/hermod-python
##build: ./hermod-python/
#restart: always
#container_name: hermodweb
#entrypoint: ['sleep','1000000']
##entrypoint: ['python','/app/src/hermod.py','-w']
##entrypoint: ['python','./src/tf.py']
##env_file:
##- secrets.env
#ports:
##- 8090:8090
#- 4430:443
#environment:
#MQTT_HOSTNAME: mqtt
#GOOGLE_OAUTH_CLIENT_ID: ${GOOGLE_OAUTH_CLIENT_ID}
#GOOGLE_OAUTH_CLIENT_SECRET: ${GOOGLE_OAUTH_CLIENT_SECRET}
#GITHUB_OAUTH_CLIENT_ID: ${GITHUB_OAUTH_CLIENT_ID}
#GITHUB_OAUTH_CLIENT_SECRET: ${GITHUB_OAUTH_CLIENT_SECRET}
#GOOGLE_ANALYTICS_CODE: ${GOOGLE_ANALYTICS_CODE}
## enable SSL for Flask
#SSL_CERTIFICATES_FOLDER: /app/certs
#AUTHLIB_INSECURE_TRANSPORT: 1
#volumes:
## volume mount certificates folder
#- ./hermod-python/certs:/app/certs
## dev mount src
#- ./hermod-python/src:/app/src
#- ./hermod-python/www:/app/www
## allow web service to updated mosquitto passwords
#- ./hermod-python/mosquitto:/etc/mosquitto
## host tts cache for delivery via web
#- ./tts_cache:/app/www/static/tts
## rasa
rasa:
image: syntithenai/hermod-python
restart: always
#build: ./hermod-python/
container_name: rasa
#entrypoint: ['sleep','1000000']
entrypoint: ['python','/app/src/hermod.py','-r'] # -t
environment:
DUCKLING_URL: http://duckling:8000
RASA_ACTIONS_URL: http://hermod:5055/webhook
volumes:
# map in host localtime
- /etc/localtime:/etc/localtime:ro
- ./hermod-python/src:/app/src
- ./hermod-python/rasa:/app/rasa
#ports:
# - 5005
# rasa action server
#rasa_actions:
#restart: always
#image: syntithenai/hermod-python
##build: ./hermod-python
#container_name: rasa_actions
##entrypoint: ['sleep','1000000']
#entrypoint: ['python','/app/src/hermod.py','-a']
## TODO - should use exposed websockets mqtt access
#environment:
#MQTT_HOSTNAME: mqtt
#MQTT_USER: ${MQTT_USER}
#MQTT_PASSWORD: ${MQTT_PASSWORD}
#MQTT_PORT: 1883
#MONGO_CONNECTION_STRING: ${MONGO_CONNECTION_STRING}
#UNSPLASH_ACCESS_KEY: ${UNSPLASH_ACCESS_KEY}
#YOUTUBE_API_KEY: ${YOUTUBE_API_KEY}
#volumes:
## map in host localtime (debian host)
#- /etc/localtime:/etc/localtime:ro
#- ./hermod-python/src:/app/src
#- ./hermod-python/rasa:/app/rasa
##ports:
## - 5055