-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
162 lines (153 loc) · 3.76 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
version: '3.4'
services:
#
# Base image for bot, shared python dependencies
#
base:
image: sfe/chatbot-base:1.0.0
container_name: sfe-chatbot-base
build:
dockerfile: ./Dockerfile
context: ./
#
# Database image, MongoDB
#
database:
image: mongo:latest
container_name: sfe-chatbot-db
environment:
- MONGO_INITDB_ROOT_USERNAME=${MONGO_ROOT}
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_PW}
- MONGO_RASA=${MONGO_RASA}
- MONGO_RASA_PW=${MONGO_RASA_PW}
- MONGO_STRAPI=${MONGO_STRAPI}
- MONGO_STRAPI_PW=${MONGO_STRAPI_PW}
networks:
- net-sfe-dev
ports:
- "27017:27017"
volumes:
- ./mongo-init.sh:/docker-entrypoint-initdb.d/mongo-init.sh:ro
- /data/db/chatbot/mongo:/data/db
- ./mongobak:/mongobak
restart: always
#
# RASA Actions server image
#
actions:
image: sfe/chatbot-actions:1.0.0
container_name: sfe-chatbot-actions
depends_on:
- base
- database
networks:
- net-sfe-dev
environment:
- GEDS_API_KEY=${GEDS_API_KEY}
ports:
- "5055:5055"
build:
dockerfile: ./actions/Dockerfile
context: ./
volumes:
- ${SFE_CHATBOT_ROOT}/actions:/usr/src/alfred/actions
- ${SFE_CHATBOT_ROOT}/models:/usr/src/alfred/models
- ${SFE_CHATBOT_ROOT}/data:/usr/src/alfred/data
restart: always
#
# RASA Core server image
#
core:
image: sfe/chatbot-core:1.0.0
container_name: sfe-chatbot-core
environment:
- MONGO_RASA=${MONGO_RASA}
- MONGO_RASA_PW=${MONGO_RASA_PW}
depends_on:
- base
- actions
- database
networks:
- net-sfe-dev
ports:
- "5005:5005"
build:
dockerfile: ./core/Dockerfile
context: ./
volumes:
- ${SFE_CHATBOT_ROOT}/core:/usr/src/alfred/core
- ${SFE_CHATBOT_ROOT}/models:/usr/src/alfred/models
- ${SFE_CHATBOT_ROOT}/data:/usr/src/alfred/data
restart: always
#
# Service Gateway front-end, ReactJS prototype
#
gateway:
depends_on:
- api
- base
- actions
- core
image: sfe/chatbot-gateway:2.0.0
container_name: sfe-chatbot-gateway
environment:
- PORT=9001 # Force create-react-app to serve on different port to live alongside original
ports:
- 9001:9001
networks:
- net-sfe-dev
build:
dockerfile: ./Dockerfile
context: ./gateway
volumes:
- ${SFE_CHATBOT_ROOT}/gateway:/app/:rw
restart: always
tty: true
stdin_open: true
#
# Service Gateway back-end, strapi prototype
#
api:
depends_on:
- database
- elasticsearch
image: sfe/chatbot-gateway-api:1.0.0
# image: strapi/strapi:latest
container_name: sfe-chatbot-gateway-api
environment:
- DATABASE_CLIENT=mongo
- DATABASE_HOST=database
- DATABASE_PORT=27017
- DATABASE_NAME=strapi
- DATABASE_USERNAME=${MONGO_STRAPI}
- DATABASE_PASSWORD=${MONGO_STRAPI_PW}
volumes:
- ${SFE_CHATBOT_ROOT}/api:/srv/app
ports:
- '1337:1337'
networks:
- net-sfe-dev
build:
dockerfile: ./Dockerfile
context: ./api
restart: always
#
# Service Gateway elastic search instance
#
# see: api/config/functions/bootstrap.js
#
elasticsearch:
image: elasticsearch:7.8.0
container_name: sfe-chatbot-elasticsearch
environment:
- discovery.type=single-node
ports:
- '127.0.0.1:9200:9200'
- '127.0.0.1:9300:9300'
networks:
- net-sfe-dev
restart: always
networks:
net-sfe-dev:
external: true
driver: bridge