-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
65 lines (65 loc) · 2.38 KB
/
docker-compose.yml
File metadata and controls
65 lines (65 loc) · 2.38 KB
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
version: '3.7'
services:
# rasa:
# image: rasa/rasa:latest-full
# container_name: rasa
# ports:
# - "${RASA_PORT}:${RASA_PORT}"
# volumes:
# - "./rasa-app-data/models:/app/models"
# - "./rasa-app-data/logs:/app/logs"
# command: "run --enable-api --debug"
project-x-frontend:
build: ./training-interface
restart: on-failure
container_name: project-x-frontend
ports:
- "${REACT_APP_PORT}:${REACT_APP_PORT}"
volumes:
- ./training-interface:/training-interface
environment:
# For some reason for react env variables to be imported properly
# you need the REACT_APP prefix & the name can't contain underscores.
- REACT_APP_RASAENDPOINT=${RASA_ENDPOINT}
depends_on:
# - rasa
- server
restart: on-failure
server:
build: ./server
restart: always
container_name: server
ports:
- "${SERVER_PORT}:${SERVER_PORT}"
volumes:
- ./server:/server
environment:
- RASA_ENDPOINT=${RASA_ENDPOINT}
- SERVER_PORT=${SERVER_PORT}
- MONGO_CONNECTION_STRING=${MONGO_CONNECTION_STRING}
- MONGO_CONNECTION_STRING_ADMIN=${MONGO_CONNECTION_STRING_ADMIN}
- SERVER_UPLOAD_DIR=${SERVER_UPLOAD_DIR}
# script to wait for mongo to be fully up & running
- WAIT_HOSTS=db:${MONGO_PORT}
depends_on:
- db
# - rasa
restart: on-failure
db:
image: mongo:latest
volumes:
- $DATABASE_DATA:/$DATABASE_DATA
# Put the script to initialise the database in the right directory withing mongo container
# It will execute it on initialisation
- ./init-db.js:/docker-entrypoint-initdb.d/init-db.js:ro
environment:
# to connect from cmd line run (read / write user) for root access use root user
# mongo --port 27017 -u "user" -p "password" --authenticationDatabase "db"
- MONGO_INITDB_DATABASE=${MONGO_INITDB_DATABASE}
- MONGO_INITDB_ROOT_USERNAME=${MONGO_INITDB_ROOT_USERNAME}
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_INITDB_ROOT_PASSWORD}
ports:
- "${MONGO_PORT}:${MONGO_PORT}"
restart: on-failure
expose:
- ${MONGO_PORT}