-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
93 lines (87 loc) · 3.12 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
version: "3.8"
services:
path-analyzer:
build:
context: ./services/path-analyzer
container_name: path-analyzer
environment:
- NODE_ENV=${HOPPIPOLLA_ENV:-development}
- HOST=${HOPPIPOLLA_PATH_ANALYZER_HOST:-0.0.0.0}
- PORT=${HOPPIPOLLA_PATH_ANALYZER_PORT:-27001}
- SCIOND_URI=${HOPPIPOLLA_SCIOND_URI}
- DATABASE_URI=/var/lib/hoppipolla/path-analyzer/sqlite.db
- POLICY_MANAGER_URI=policy-manager:${HOPPIPOLLA_POLICY_MANAGER_PORT:-27002}
- MAX_PATHS_BATCH=${HOPPIPOLLA_PATH_ANALYZER_MAX_PATHS_BATCH:-10}
volumes:
- /var/lib/hoppipolla/path-analyzer
ports:
- 127.0.0.1:${HOPPIPOLLA_PATH_ANALYZER_PORT:-27001}:${HOPPIPOLLA_PATH_ANALYZER_PORT:-27001}
networks:
- hoppipolla
policy-manager:
build:
context: ./services/policy-manager
container_name: policy-manager
depends_on:
- policy-manager_db
environment:
- ENV=${HOPPIPOLLA_ENV:-development}
- HOST=${HOPPIPOLLA_POLICY_MANAGER_HOST:-localhost}
- PORT=${HOPPIPOLLA_POLICY_MANAGER_PORT:-27002}
- LOG_LEVEL=${HOPPIPOLLA_POLICY_MANAGER_LOG_LEVEL:-20}
- N_WORKERS=${HOPPIPOLLA_POLICY_MANAGER_N_WORKERS:-10}
- DATABASE_URI=postgresql://${HOPPIPOLLA_POLICY_MANAGER_PG_USER:-postgres}:${HOPPIPOLLA_POLICY_MANAGER_PG_PASSWORD}@policy-manager_db:${HOPPIPOLLA_POLICY_MANAGER_PG_PORT:-5432}/${HOPPIPOLLA_POLICY_MANAGER_PG_DBNAME:-hoppipolla}
- NIP_PROXY_URI=nip-proxy:${HOPPIPOLLA_NIP_PROXY_PORT:-27003}
ports:
- 127.0.0.1:${HOPPIPOLLA_POLICY_MANAGER_PORT:-27002}:${HOPPIPOLLA_POLICY_MANAGER_PORT:-27002}
networks:
- hoppipolla
policy-manager_db:
image: postgres:15
container_name: policy-manager_db
restart: always
user: postgres
environment:
- POSTGRES_PORT=${HOPPIPOLLA_POLICY_MANAGER_PG_PORT:-5432}
- POSTGRES_USER=${HOPPIPOLLA_POLICY_MANAGER_PG_USER:-postgres}
- POSTGRES_PASSWORD=${HOPPIPOLLA_POLICY_MANAGER_PG_PASSWORD}
- POSTGRES_DB=${HOPPIPOLLA_POLICY_MANAGER_PG_DBNAME:-hoppipolla}
volumes:
- /var/lib/postgresql/data
ports:
- 127.0.0.1:${HOPPIPOLLA_POLICY_MANAGER_PG_PORT:-5432}:${HOPPIPOLLA_POLICY_MANAGER_PG_PORT:-5432}
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
networks:
- hoppipolla
nip-proxy:
build:
context: ./services/nip-proxy
container_name: nip-proxy
depends_on:
- nip-proxy_cache
environment:
- NODE_ENV=${HOPPIPOLLA_ENV:-development}
- HOST=${HOPPIPOLLA_NIP_PROXY_HOST:-localhost}
- PORT=${HOPPIPOLLA_NIP_PROXY_PORT:-27003}
- REDIS_URI=redis://nip-proxy_cache:6379
- ENERGY_READING_MOCKFILE=${HOPPIPOLLA_NIP_PROXY_ENERGY_READING_MOCKFILE:-mocks/energy-reading.json}
ports:
- 127.0.0.1:${HOPPIPOLLA_NIP_PROXY_PORT:-27003}:${HOPPIPOLLA_NIP_PROXY_PORT:-27003}
volumes:
- ./mocks:/app/mocks
networks:
- hoppipolla
nip-proxy_cache:
image: redis/redis-stack:latest
ports:
- 127.0.0.1:6379:6379
- 127.0.0.1:8001:8001
networks:
- hoppipolla
networks:
hoppipolla:
driver: bridge