Repository navigation
Expand file tree
/
Copy pathdocker-compose.example.yml
More file actions
57 lines (56 loc) · 2.55 KB
/
Copy pathdocker-compose.example.yml
File metadata and controls
57 lines (56 loc) · 2.55 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
# CoreScope — simple single-container deployment using the pre-built
# image from GHCR.
#
# AUDIENCE: third-party operators running a self-hosted CoreScope on
# ONE host. Ships with the built-in Mosquitto broker DISABLED by
# default (#441: DISABLE_MOSQUITTO defaults to `true`), so point
# mqttSources in config.json (or MQTT_BROKER) at your MQTT broker, or
# set DISABLE_MOSQUITTO=false to run the bundled one in-container.
#
# For the CoreScope maintainers' internal staging deployment (with a
# standalone `mqtt-broker` container on external network
# `meshcore-net`), see `docker-compose.staging.yml`.
#
# Usage: docker compose -f docker-compose.example.yml up -d
# Docs: https://github.com/Kpa-clawbot/CoreScope/blob/master/DEPLOY.md
services:
corescope:
image: ghcr.io/kpa-clawbot/corescope:latest
ports:
- "${HTTP_PORT:-80}:80"
volumes:
- ${DATA_DIR:-./data}:/app/data
environment:
- DISABLE_CADDY=${DISABLE_CADDY:-true}
- DISABLE_MOSQUITTO=${DISABLE_MOSQUITTO:-true}
# In-process settings — read by the server and the ingestor, not by
# docker compose. Without these lines a value in .env reaches docker
# compose and stops there, so the documented "one line in .env" would
# change nothing in the container (#372). Every one defaults to EMPTY,
# which every reader ignores: pprofbind skips a blank host or port,
# LoadConfig skips a blank MQTT_BROKER, and MQTT_SOURCE_STRICT is
# false unless truthy. An install that never set them is unaffected.
- MQTT_BROKER=${MQTT_BROKER:-}
- MQTT_TOPIC=${MQTT_TOPIC:-}
- MQTT_SOURCE_STRICT=${MQTT_SOURCE_STRICT:-}
- ENABLE_PPROF=${ENABLE_PPROF:-}
- PPROF_HOST=${PPROF_HOST:-}
- PPROF_HOST_SERVER=${PPROF_HOST_SERVER:-}
- PPROF_HOST_INGESTOR=${PPROF_HOST_INGESTOR:-}
- PPROF_PORT=${PPROF_PORT:-}
- PPROF_PORT_SERVER=${PPROF_PORT_SERVER:-}
- PPROF_PORT_INGESTOR=${PPROF_PORT_INGESTOR:-}
# Opt-in: run corescope-server and corescope-ingestor without root.
# Off unless set. Use a dedicated ID that owns nothing on the host, not
# the owner of DATA_DIR. Back up and record owners first, and read
# docs/deployment.md, "Running the Go services without root (opt-in)",
# for what changes on the host and how to roll back.
# - CORESCOPE_RUN_AS_NONROOT=1
# - CORESCOPE_UID=10001
# - CORESCOPE_GID=10001
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:3000/api/stats"]
interval: 30s
timeout: 5s
retries: 3