Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
68 lines (64 loc) · 2.2 KB
/
Copy pathdocker-compose.yml
File metadata and controls
68 lines (64 loc) · 2.2 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
61
62
63
64
65
66
67
68
# IMPORTANT: this VPS already hosts other production sites.
# Insight is FULLY isolated:
# - listens ONLY on 127.0.0.1:8787 (localhost), never on 80/443
# - dedicated Docker network "insight", dedicated volumes
# - the reverse proxy ALREADY present on the VPS (Nginx/Apache/panel) proxies
# the public host -> 127.0.0.1:8787 and handles HTTPS.
# Nothing here touches the existing sites.
services:
app:
image: ghcr.io/digihold/insight-app:latest
container_name: insight-app
restart: unless-stopped
environment:
- PUBLIC_HOST=${PUBLIC_HOST}
- CLICKHOUSE_URL=http://clickhouse:8123
- CLICKHOUSE_DB=insight
- CLICKHOUSE_USER=default
- CLICKHOUSE_PASSWORD=${CLICKHOUSE_PASSWORD}
- SQLITE_PATH=/data/insight.db
# Analytics timezone for "Today", the heatmap, retention and revenue.
# Any IANA name (e.g. Europe/Zurich). Defaults to UTC.
- INSIGHT_TZ=${INSIGHT_TZ:-UTC}
- AUTH_SECRET=${AUTH_SECRET}
- ADMIN_EMAIL=${ADMIN_EMAIL}
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
- MAPBOX_TOKEN=${MAPBOX_TOKEN}
# Read-only CLI token; empty (unset) disables the API entirely.
- INSIGHT_API_TOKEN=${INSIGHT_API_TOKEN:-}
# Public read-only demo at /demo for this one site id (revenue hidden).
# Empty disables the demo entirely.
- DEMO_SITE_ID=${DEMO_SITE_ID:-}
volumes:
- app_data:/data
depends_on:
- clickhouse
ports:
- "127.0.0.1:8787:3000" # localhost ONLY
networks:
- insight
clickhouse:
image: clickhouse/clickhouse-server:24-alpine
container_name: insight-clickhouse
restart: unless-stopped
environment:
- CLICKHOUSE_DB=insight
- CLICKHOUSE_USER=default
- CLICKHOUSE_PASSWORD=${CLICKHOUSE_PASSWORD}
volumes:
- clickhouse_data:/var/lib/clickhouse
- ./clickhouse/init:/docker-entrypoint-initdb.d:ro
- ./clickhouse/config.d/logs.xml:/etc/clickhouse-server/config.d/logs.xml:ro
ulimits:
nofile:
soft: 262144
hard: 262144
networks:
- insight
# No published port: ClickHouse stays internal, invisible from the Internet.
volumes:
clickhouse_data:
app_data:
networks:
insight:
name: insight