-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
60 lines (59 loc) · 3.18 KB
/
Copy pathdocker-compose.yml
File metadata and controls
60 lines (59 loc) · 3.18 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
services:
vfb-status:
build: .
image: virtualflybrain/vfb-status:latest
container_name: vfb-status
restart: unless-stopped
ports:
- "8000:8000"
environment:
CHECK_INTERVAL_SECONDS: "3600" # hourly probes
CONFIG_PATH: "/srv/vfb-status/config/services.yml"
STATE_FILE: "/data/state.json" # last-known snapshot, survives restarts
HISTORY_DB: "/data/history.db" # default; set "" to disable
HISTORY_RETENTION_DAYS: "365" # 0 = keep forever
HISTORY_BUCKETS: "72" # status-strip width on the page
HISTORY_BUCKET_SECONDS: "3600" # one bucket = 1 hour
# Rancher node health checks — comma- or whitespace-separated list of
# short hostnames. Each name N is probed at http://N.inf.ed.ac.uk:5050
# (the existing VFB convention). Only reachable from inside the
# Edinburgh network — clear this value when running off-campus.
RANCHER_SERVERS: "buttermilk parsley sourcream chive mayo dill"
RANCHER_DOMAIN: "inf.ed.ac.uk"
RANCHER_PORT: "5050"
RANCHER_TIMEOUT: "5"
# Neo4j Cypher API credentials. Required for any entry in the
# neo4j_services: block of config/services.yml. NEVER commit the
# password into this file — pass it via env, .env file, or rancher
# secrets. The default Neo4j username on VFB is "neo4j"; the read-only
# password for the public PDB/KB endpoints is set by the deployer.
NEO4J_PASSWORD: "${NEO4J_PASSWORD:-}"
# Rancher v1 API credentials. Needed when any cache_services entry has
# a rancher: block (per-container probing). Environment-scoped read-only
# key is enough. NEVER commit the values — pass via env or rancher
# secrets. See https://rancher.com/docs/rancher/v1.6/en/api/v2-beta/
RANCHER_API_KEY: "${RANCHER_API_KEY:-}"
RANCHER_API_SECRET: "${RANCHER_API_SECRET:-}"
# Cluster overview (added v0.7.0). Defaults match the live VFB project
# (id 1a5 on herd) and the production stack. RANCHER_STACKS is a comma-
# or space-separated list — keep it tight to avoid dev-stack noise.
RANCHER_PROJECT_URL: "${RANCHER_PROJECT_URL:-https://herd.virtualflybrain.org/v2-beta/projects/1a5}"
RANCHER_STACKS: "${RANCHER_STACKS:-vfb-services-live}"
# DNS ingress detection. By default DYNAMIC — every probe resolves
# RANCHER_DNS_HOSTNAME via the OS resolver (honours TTL, no caching)
# and tags every host whose agentIpAddress is in the A-records. Leave
# RANCHER_DNS_HOSTS empty so the auto-detect wins; only set it as a
# static override for testing or split-horizon DNS edge cases.
RANCHER_DNS_HOSTNAME: "${RANCHER_DNS_HOSTNAME:-virtualflybrain.org}"
RANCHER_DNS_HOSTS: "${RANCHER_DNS_HOSTS:-}"
volumes:
- ./config:/srv/vfb-status/config:ro # edit services.yml on the host
- vfb-status-data:/data
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request,sys; sys.exit(0 if urllib.request.urlopen('http://127.0.0.1:8000/healthz', timeout=3).status==200 else 1)"]
interval: 30s
timeout: 5s
retries: 3
start_period: 20s
volumes:
vfb-status-data: