forked from helxplatform/dug
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
92 lines (85 loc) · 2.98 KB
/
docker-compose.yaml
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
version: '3.0'
#################################################################################
##
## A service stack for the Dug semantic search framework.
##
## NOTE: .env contains *_HOST variables that are set to internal docker service
## names. These names resolve to an IP address *within* the docker machine
## CIDR block, not your local development machine.
##
## NOTE: To connect to a dug service running in docker machine, from your local
## development machine, you will need to follow the steps in the Quickstart
## section of the README.md and set/export the env vars with special attention
## paid to the env vars: ELASTIC_API_HOST, and REDIS_HOST.
##
#################################################################################
services:
#################################################################################
##
## The OpenAPI endpoint for search. This is the only service to be
## exposed beyond the internal network.
##
#################################################################################
api:
build:
dockerfile: Dockerfile
context: .
depends_on:
- elasticsearch
- redis
restart: always
networks:
- dug-network
environment:
ELASTIC_API_HOST: "$ELASTIC_API_HOST"
ELASTIC_PASSWORD: "$ELASTIC_PASSWORD"
NBOOST_API_HOST: "$NBOOST_API_HOST"
REDIS_HOST: "$REDIS_HOST"
REDIS_PASSWORD: "$REDIS_PASSWORD"
FLASK_ENV: "development"
PYTHONUNBUFFERED: "TRUE"
entrypoint: [ "uvicorn",
"--host", "0.0.0.0" , "--port" , "$API_PORT",
"--log-level=debug", "--reload-dir", "/home/dug/dug/", "--reload", "dug.server:APP" ]
volumes:
- ./src:/home/dug/dug/
ports:
- $API_PORT:$API_PORT
#################################################################################
##
## A search engine providing scalable indexing and full text search.
##
#################################################################################
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.11.3
networks:
- dug-network
environment:
- ELASTIC_PASSWORD=$ELASTIC_PASSWORD
- discovery.type=single-node
- xpack.security.enabled=true
volumes:
- $DATA_DIR/elastic:/usr/share/elasticsearch/data
ports:
- '9200:9200'
- '9300:9300'
#################################################################################
##
## A memory cache for results of high volume service requests.
## https://redis.io/docs/stack/get-started/install/docker/
##
#################################################################################
redis:
image: 'redis/redis-stack:6.2.4-v2'
networks:
- dug-network
environment:
- REDIS_ARGS=--requirepass $REDIS_PASSWORD
- REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL
volumes:
- $DATA_DIR/redis:/data
ports:
- '6379:6379'
networks:
dug-network:
driver: bridge