-
-
Notifications
You must be signed in to change notification settings - Fork 23
/
docker-compose-mongo.yml
61 lines (53 loc) · 1.71 KB
/
docker-compose-mongo.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
version: '2.1'
services:
server:
image: hastic/server:latest
build:
dockerfile: server/Dockerfile
context: .
environment:
HASTIC_API_KEY: ${HASTIC_API_KEY?"HASTIC_API_KEY variable is required"}
GRAFANA_URL: ${GRAFANA_URL?"GRAFANA_URL variable is required"}
HASTIC_DB_CONNECTION_STRING: ${HASTIC_MONGO_USER:-hastic}:${HASTIC_MONGO_PASSWORD:-password}@mongo:27017/${HASTIC_MONGO_DB:-hastic}
HASTIC_ALERT_TYPE: ${HASTIC_ALERT_TYPE}
HASTIC_ALERTMANAGER_URL: ${HASTIC_ALERTMANAGER_URL}
HASTIC_WEBHOOK_URL: ${HASTIC_WEBHOOK_URL}
HASTIC_INSTANCE_NAME: ${HASTIC_INSTANCE_NAME}
HASTIC_ALERT_IMAGE: ${HASTIC_ALERT_IMAGE}
HASTIC_TIMEZONE_OFFSET: ${HASTIC_TIMEZONE_OFFSET}
HASTIC_DB_CONNECTION_TYPE: mongodb
ports:
- ${HASTIC_PORT:-8000}:8000
networks:
- hastic-network
restart: always
depends_on:
- mongo
analytics:
image: hastic/analytics:latest
build: analytics
environment:
# TODO: use any port for server connection
HASTIC_SERVER_URL: "ws://server:8002"
HS_AN_LOGGING_LEVEL: ${HS_AN_LOGGING_LEVEL}
networks:
- hastic-network
restart: always
mongo:
image: mongo:4.2.1-bionic
environment:
MONGO_INITDB_ROOT_USERNAME: ${HASTIC_MONGO_ADMIN_USER:-admin}
MONGO_INITDB_ROOT_PASSWORD: ${HASTIC_MONGO_ADMIN_PASSWORD:-password}
MONGO_INITDB_DATABASE: ${HASTIC_MONGO_DB:-hastic}
networks:
- hastic-network
restart: always
volumes:
- hastic_mongo:/data/db
- hastic_mongo_config:/data/configdb
- ./mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
volumes:
hastic_mongo:
hastic_mongo_config:
networks:
hastic-network: