Repository navigation
Expand file tree
/
Copy pathdocker-compose.selfhost.yml
More file actions
64 lines (61 loc) · 2.72 KB
/
Copy pathdocker-compose.selfhost.yml
File metadata and controls
64 lines (61 loc) · 2.72 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
# ──────────────────────────────────────────────────────────────────────
# OmniRoute — Self-Host Compose (零月费自托管 / zero-fee self-host)
# ──────────────────────────────────────────────────────────────────────
# KISS: ONE command brings up the whole thing on loopback.
#
# cp .env.selfhost.example .env # edit the 2 secrets you want
# docker compose -f docker-compose.selfhost.yml up -d
# open http://127.0.0.1:20128
#
# No profiles, no build step, no multi-tenant anything.
# Pulls the published image `diegosouzapw/omniroute:latest`.
#
# All app ports bind to 127.0.0.1 ONLY by default (REQUIRE_API_KEY ships
# as false). Set APP_BIND_HOST=0.0.0.0 in .env ONLY after you have set
# REQUIRE_API_KEY=true OR put an auth-enforcing reverse proxy in front.
# See docs/getting-started/SELF_HOST_GUIDE.md.
# ──────────────────────────────────────────────────────────────────────
services:
redis:
image: docker.io/library/redis:8.6.5-alpine
container_name: omniroute-redis
restart: unless-stopped
# No port published to the host — the app reaches Redis over the compose
# network (redis:6379). Publishing an unauthenticated Redis on 0.0.0.0
# is a footgun we refuse to ship. If you need host-side redis-cli, run
# docker exec -it omniroute-redis redis-cli
volumes:
- redis-data:/data
command: redis-server --save 60 1 --loglevel warning
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 3
omniroute:
image: diegosouzapw/omniroute:latest
container_name: omniroute
restart: unless-stopped
stop_grace_period: 40s
env_file: .env
environment:
- DATA_DIR=/app/data
- REDIS_URL=redis://redis:6379
ports:
# Loopback-only by default. Override APP_BIND_HOST in .env to expose.
- "${APP_BIND_HOST:-127.0.0.1}:${DASHBOARD_PORT:-20128}:${DASHBOARD_PORT:-20128}"
- "${APP_BIND_HOST:-127.0.0.1}:${API_PORT:-20129}:${API_PORT:-20129}"
- "${APP_BIND_HOST:-127.0.0.1}:${LIVE_WS_PORT:-20132}:${LIVE_WS_PORT:-20132}"
volumes:
- ./data:/app/data
depends_on:
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "node", "healthcheck.mjs"]
interval: 30s
timeout: 5s
retries: 3
start_period: 20s
volumes:
redis-data: