Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
76 lines (75 loc) · 4.28 KB
/
Copy pathdocker-compose.yml
File metadata and controls
76 lines (75 loc) · 4.28 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
69
70
71
72
73
74
75
76
# Command server — self-host template.
#
# docker compose up -d
#
# Pulls the published image. To run your own changes instead, build it first:
# docker build -t ghcr.io/legitimate-apps/command-server:latest -f ../server/docker/Dockerfile ../server
#
# Defaults here target the setup the in-app guide describes: Docker on a machine you own,
# reached from your phone over your own Wi-Fi. Everything deployment-specific lives in
# `deploy/.env` (gitignored) — see `.env.example` for what each value does.
#
# Serving this over the public internet? Put it behind a tunnel or reverse proxy that
# terminates TLS (Tailscale, Cloudflare Tunnel, Caddy), then set COMMAND_BIND_ADDR=127.0.0.1
# so the container is only reachable through the proxy.
services:
command:
image: ghcr.io/legitimate-apps/command-server:latest
container_name: command
restart: unless-stopped
environment:
COMMAND_ENVIRONMENT: ${COMMAND_ENVIRONMENT:-prod}
# Public address, if it has one. Used for absolute links; safe to leave empty on a LAN.
COMMAND_PUBLIC_BASE_URL: ${COMMAND_PUBLIC_BASE_URL:-}
# Session cookie Secure flag. "auto" marks it Secure exactly when the request came in
# over HTTPS (directly or via X-Forwarded-Proto), which suits both a LAN and a proxy.
COMMAND_COOKIE_SECURE: ${COMMAND_COOKIE_SECURE:-auto}
COMMAND_LOG_LEVEL: ${COMMAND_LOG_LEVEL:-info}
# Your own server (self) or a multi-tenant one (cloud); signup; proxies in front.
COMMAND_SERVER_KIND: ${COMMAND_SERVER_KIND:-self}
COMMAND_ALLOW_REGISTRATION: ${COMMAND_ALLOW_REGISTRATION:-false}
COMMAND_TRUSTED_PROXY_HOPS: ${COMMAND_TRUSTED_PROXY_HOPS:-0}
# Operator backups (GET /api/admin/backup). Empty = the endpoint doesn't exist.
COMMAND_BACKUP_TOKEN: ${COMMAND_BACKUP_TOKEN:-}
# Per-account ceilings (0 = unlimited).
COMMAND_MAX_ATTACHMENT_BYTES_PER_ACCOUNT: ${COMMAND_MAX_ATTACHMENT_BYTES_PER_ACCOUNT:-2147483648}
COMMAND_MAX_ATTACHMENTS_PER_ACCOUNT: ${COMMAND_MAX_ATTACHMENTS_PER_ACCOUNT:-5000}
COMMAND_MAX_NOTES_PER_ACCOUNT: ${COMMAND_MAX_NOTES_PER_ACCOUNT:-100000}
COMMAND_MAX_ASSIGNMENTS_PER_ACCOUNT: ${COMMAND_MAX_ASSIGNMENTS_PER_ACCOUNT:-50000}
COMMAND_MAX_ACTIVITIES_PER_ACCOUNT: ${COMMAND_MAX_ACTIVITIES_PER_ACCOUNT:-200000}
# AI note titles. Without a key, titles fall back to the note's first line.
COMMAND_AI_API_KEY: ${COMMAND_AI_API_KEY:-}
COMMAND_AI_TITLE_MODEL: ${COMMAND_AI_TITLE_MODEL:-qwen/qwen3.8-flash}
# Billing. Gating stays off unless you run subscriptions.
COMMAND_REVENUECAT_WEBHOOK_TOKEN: ${COMMAND_REVENUECAT_WEBHOOK_TOKEN:-}
COMMAND_AGENT_REQUIRE_SUBSCRIPTION: ${COMMAND_AGENT_REQUIRE_SUBSCRIPTION:-false}
COMMAND_REVENUECAT_API_KEY: ${COMMAND_REVENUECAT_API_KEY:-}
# APNs push reminders. Optional — push is a no-op when the key is absent. The private
# .p8 is mounted read-only from ./keys (never baked into the image or committed).
COMMAND_APNS_KEY_PATH: ${COMMAND_APNS_KEY_PATH:-}
COMMAND_APNS_KEY_ID: ${COMMAND_APNS_KEY_ID:-}
COMMAND_APNS_TEAM_ID: ${COMMAND_APNS_TEAM_ID:-}
COMMAND_APNS_TOPIC: ${COMMAND_APNS_TOPIC:-}
# Left empty, both are generated on first start and kept in the data volume.
COMMAND_PEER_TOKEN_KEY: ${COMMAND_PEER_TOKEN_KEY:-}
COMMAND_CALENDAR_EXPORT_SECRET: ${COMMAND_CALENDAR_EXPORT_SECRET:-}
volumes:
- command-data:/data
# The whole directory, so a missing key file cannot make Docker invent one as a folder.
- ./keys:/keys:ro
ports:
# 0.0.0.0 by default: the phone has to reach this from elsewhere on your network, which
# a loopback bind silently prevents — the host's own health check still passes, so the
# failure only ever shows up on the phone. Set COMMAND_BIND_ADDR=127.0.0.1 when a proxy
# or tunnel on the same host is the only thing that should reach it.
- "${COMMAND_BIND_ADDR:-0.0.0.0}:${COMMAND_HOST_PORT:-9071}:8000"
mem_limit: ${COMMAND_MEM_LIMIT:-256m}
cpus: ${COMMAND_CPUS:-1.0}
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request,sys; sys.exit(0 if urllib.request.urlopen('http://127.0.0.1:8000/api/health').status==200 else 1)"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
volumes:
command-data: