forked from change-metrics/monocle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml.dev
57 lines (57 loc) · 1.94 KB
/
docker-compose.yml.dev
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
services:
api:
build: '.'
command: uwsgi --uid guest --gid nogroup --http :9876 --socket :9877 --manage-script-name --mount /app=monocle.webapp:app
depends_on:
- elastic
environment:
ALLOW_ORIGIN: "${MONOCLE_URL:-http://localhost:3000}"
CLIENT_ID: "${GITHUB_CLIENT_ID:-}"
CLIENT_SECRET: "${GITHUB_CLIENT_SECRET:-}"
CONFIG: /etc/monocle/config.yaml
ELASTIC_CONN: elastic:9200
REDIRECT_URL: "${MONOCLE_API_URL:-http://localhost:9876}/api/0/authorize"
WEB_URL: "${MONOCLE_URL:-http://localhost:3000}"
healthcheck:
test: "python -c \"import requests,sys; r=requests.get('http://localhost:9876/api/0/health'); print(r.text); sys.exit(1) if r.status_code!=200 else sys.exit(0)\""
ports:
- "${MONOCLE_API_ADDR:-0.0.0.0}:9876:9876"
- "${MONOCLE_API_ADDR:-0.0.0.0}:9877:9877"
volumes:
- "./etc:/etc/monocle:z"
crawler:
build: '.'
command: monocle --elastic-conn elastic:9200 crawler --config /etc/monocle/config.yaml
depends_on:
- elastic
environment:
APP_ID: "${GITHUB_APP_ID:-}"
APP_KEY_PATH: "${GITHUB_APP_KEY_PATH:-/etc/monocle/app_key.rsa}"
volumes:
- "./etc:/etc/monocle:z"
- "./dump:/var/lib/crawler:Z"
elastic:
environment:
ES_JAVA_OPTS: "-Xms${ES_XMS:-512m} -Xmx${ES_XMX:-512m}"
discovery.type: single-node
healthcheck:
test: "curl --silent --fail localhost:9200/_cluster/health || exit 1"
image: docker.elastic.co/elasticsearch/elasticsearch:7.10.1
ports:
- "${MONOCLE_ELASTIC_ADDR:-0.0.0.0}:9200:9200"
ulimits:
nofile:
hard: 65535
soft: 65535
volumes:
- "./data:/usr/share/elasticsearch/data:Z"
web:
build: web
depends_on:
- api
environment:
REACT_APP_API_URL: "${MONOCLE_API_URL:-http://localhost:9876}"
REACT_APP_TITLE: "${MONOCLE_TITLE:-}"
ports:
- "${MONOCLE_WEB_ADDR:-0.0.0.0}:3000:3000"
version: '3'