-
Notifications
You must be signed in to change notification settings - Fork 230
/
docker-compose.yml
183 lines (164 loc) · 4.34 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
172
173
174
175
176
177
178
179
180
181
182
183
# -------------------------------------
# ▒█▀▀█ █▀▀█ █▀▀ █▀▀█ ▒█▀▀█ ▒█▀▀█ ▀▀█▀▀
# ▒█▄▄▀ █▄▄█ ▀▀█ █▄▄█ ▒█░▄▄ ▒█▄▄█ ░▒█░░
# ▒█░▒█ ▀░░▀ ▀▀▀ ▀░░▀ ▒█▄▄█ ▒█░░░ ░▒█░░
# +-----------------------------------+
# | http://RasaGPT.dev by @paulpierre |
# +-----------------------------------+
version: '3.9'
services:
# -------------------
# API service for LLM
# -------------------
api:
build:
context: ./app/api
restart: always
container_name: chat_api
env_file:
- .env
ports:
- 8888:8888
healthcheck:
test: ["CMD", "curl", "-f", "http://api:8888/health"]
interval: 15s
retries: 5
depends_on:
- db
networks:
- chat-network
volumes:
- ./app/scripts/wait-for-it.sh:/app/api/wait-for-it.sh
- ./app/api:/app/api
# -------------------
# Ngrok agent service
# -------------------
ngrok:
image: ngrok/ngrok:latest
container_name: chat_ngrok
ports:
- 4040:4040
env_file:
- .env
environment:
NGROK_CONFIG: /etc/ngrok.yml
NGROK_AUTH_TOKEN: ${NGROK_AUTH_TOKEN:-}
NGROK_DEBUG: ${NGROK_DEBUG:-true}
NGROK_API_KEY: ${NGROK_API_KEY:-}
networks:
- chat-network
volumes:
- ./app/rasa/ngrok.yml:/etc/ngrok.yml
restart: unless-stopped
# -----------------
# Core Rasa service
# -----------------
rasa-core:
image: khalosa/rasa-aarch64:3.5.2
container_name: chat_rasa_core
env_file:
- .env
volumes:
- ./app/rasa:/app
- ./app/scripts/wait-for-it.sh:/app/wait-for-it.sh
ports:
- 5005:5005
entrypoint: ["/bin/bash", "-c", "chmod +x /app/wait-for-it.sh && /app/wait-for-it.sh rasa-credentials:8889 -t 120 -o && rasa run --enable-api --cors '*' --debug --credentials /app/credentials.yml --endpoints /app/endpoints.yml --model /app/models"]
networks:
- chat-network
depends_on:
- rasa-actions
- rasa-credentials
# --------------------
# Rasa actions service
# --------------------
rasa-actions:
build:
context: ./app/rasa
dockerfile: ./actions/Dockerfile
container_name: chat_rasa_actions
env_file:
- .env
ports:
- 5055:5055
depends_on:
- rasa-credentials
networks:
- chat-network
# -------------------------------
# Rasa credentials helper service
# -------------------------------
rasa-credentials:
build:
context: ./app/rasa-credentials
dockerfile: Dockerfile
container_name: chat_rasa_credentials
volumes:
- ./app/rasa:/app/rasa
- ./app/rasa-credentials:/app/rasa-credentials
ports:
- 8889:8889
env_file:
- .env
networks:
- chat-network
healthcheck:
test: ["CMD", "curl", "-f", "http://rasa-credentials:8889"]
interval: 15s
retries: 5
# -------------------------
# Postgres database service
# -------------------------
db:
build:
context: ./app/db
container_name: chat_db
env_file:
- .env
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
volumes:
- ./mnt/db:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 5s
retries: 5
networks:
- chat-network
# --------------------------------
# PgAdmin database browser service
# --------------------------------
pgadmin:
container_name: chat_pgadmin
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:[email protected]}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-admin}
PGADMIN_CONFIG_SERVER_MODE: 'False'
volumes:
- ./mnt/pgadmin:/var/lib/pgadmin
ports:
- "${PGADMIN_PORT:-5050}:80"
restart: unless-stopped
depends_on:
- db
networks:
- chat-network
# ----------------------------
# Container log viewer service
# ----------------------------
dozzle:
container_name: chat_dozzle
image: amir20/dozzle:latest
volumes:
- /var/run/docker.sock:/var/run/docker.sock
ports:
- 9999:8080
depends_on:
- db
networks:
chat-network:
driver: bridge