-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhomelabarr.yml
More file actions
200 lines (193 loc) · 5.7 KB
/
Copy pathhomelabarr.yml
File metadata and controls
200 lines (193 loc) · 5.7 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
# HomelabARR GHCR Production Deployment
#
# REQUIRED before deploying:
# ./secrets/ — run scripts/init-secrets.sh to bootstrap secret files
# CORS_ORIGIN — your public domain (e.g., https://homelabarr.example.com)
#
# OPTIONAL (defaults shown):
# CLI_BRIDGE_HOST_PATH — path to your HomelabARR CLI installation (default: /opt/homelabarr)
# FRONTEND_PORT — host port for the dashboard (default: 8084)
#
# Usage:
# docker compose -f homelabarr.yml up -d
secrets:
jwt_key_current:
file: ${JWT_SECRET_FILE:-./secrets/jwt_key_current}
jwt_key_previous:
file: ${JWT_KEY_PREVIOUS_FILE:-./secrets/jwt_key_previous}
default_admin_password:
file: ${DEFAULT_ADMIN_PASSWORD_FILE:-./secrets/default_admin_password}
alert_webhook_secret:
file: ${ALERT_WEBHOOK_SECRET_FILE:-./secrets/alert_webhook_secret}
sqlcipher_key:
file: ${SQLCIPHER_KEY_FILE:-./secrets/sqlcipher_key}
services:
# Auto-updates: this compose does not opt in to Watchtower by default.
# If you run Watchtower in opt-in (LABEL_ENABLE=true) mode and want
# auto-pulls on this stack, add to each service:
# labels:
# - com.centurylinklabs.watchtower.enable=true
# We recommend opt-in mode plus signature verification (see SECURITY.md).
# Docker socket proxy — allow-listed API access only, no EXEC/BUILD
socket-proxy:
image: lscr.io/linuxserver/socket-proxy:latest@sha256:a1740f01925d07c4ed6e73ea21ec798cff28e0a811b3c1672617b95eee76d79c
container_name: homelabarr-socket-proxy
restart: unless-stopped
environment:
- LOG_LEVEL=warning
- CONTAINERS=1
- IMAGES=1
- NETWORKS=1
- VOLUMES=1
- INFO=1
- VERSION=1
- PING=1
- EVENTS=1
- POST=1
- ALLOW_START=1
- ALLOW_STOP=1
- ALLOW_RESTARTS=1
- BUILD=0
- COMMIT=0
- CONFIGS=0
- EXEC=0
- GRPC=0
- PLUGINS=0
- SECRETS=0
- SESSION=0
- SWARM=0
- SYSTEM=0
- NODES=0
- SERVICES=0
- TASKS=0
- DISTRIBUTION=0
privileged: false
read_only: true
tmpfs:
- /run
cap_drop:
- ALL
security_opt:
- no-new-privileges:true
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- homelabarr-internal
pids_limit: 64
mem_limit: 64m
cpus: 0.25
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:2375/_ping"]
interval: 30s
timeout: 5s
retries: 3
frontend:
image: ghcr.io/imogenlabs/homelabarr-frontend:latest
container_name: homelabarr-frontend
restart: unless-stopped
user: "101:101"
environment:
- BACKEND_URL=http://backend:8092
- LOG_LEVEL=${LOG_LEVEL:-warn}
ports:
- "${FRONTEND_PORT:-8084}:8080"
networks:
- homelabarr
cap_drop:
- ALL
security_opt:
- apparmor=homelabarr-frontend
- no-new-privileges:true
read_only: true
tmpfs:
- /var/cache/nginx:rw,noexec,nosuid,nodev,size=32m
- /var/run:rw,noexec,nosuid,nodev,size=2m
- /etc/nginx/conf.d:rw,noexec,nosuid,nodev,size=1m
- /tmp:rw,noexec,nosuid,nodev,size=8m
pids_limit: 128
mem_limit: 128m
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
depends_on:
- backend
backend:
image: ghcr.io/imogenlabs/homelabarr-backend:latest
container_name: homelabarr-backend
restart: unless-stopped
user: "1001:1001"
environment:
- NODE_ENV=production
- PORT=8092
- LOG_LEVEL=${LOG_LEVEL:-info}
- CORS_ORIGIN=${CORS_ORIGIN:?CORS_ORIGIN must be set to your public domain}
- DOCKER_HOST=tcp://socket-proxy:2375
- CLI_BRIDGE_PATH=/homelabarr
- CLI_INTEGRATION_ENABLED=true
- AUTH_ENABLED=${AUTH_ENABLED:-true}
- SECRET_ROOT=/run/secrets
- ACCESS_TOKEN_TTL=${ACCESS_TOKEN_TTL:-15m}
- REFRESH_TOKEN_TTL=${REFRESH_TOKEN_TTL:-14d}
# BIND_ADDRESS is intentionally 0.0.0.0 — binds inside the container's
# network namespace only. Reachable from host only via Docker bridge.
# Do NOT use network_mode: host with this binding.
- BIND_ADDRESS=0.0.0.0
- ALERT_WEBHOOK_URL=${ALERT_WEBHOOK_URL:-}
- ALERT_EVENTS=${ALERT_EVENTS:-login.locked,audit.chain.broken,session.refresh.fail}
- AUDIT_STRICT=${AUDIT_STRICT:-0}
volumes:
- ${CLI_BRIDGE_HOST_PATH:-/opt/homelabarr}:/homelabarr:ro
- homelabarr-data:/app/data
- homelabarr-config:/app/server/config
- homelabarr-activity:/app/server/activity-data
networks:
- homelabarr
- homelabarr-internal
cap_drop:
- ALL
security_opt:
- apparmor=homelabarr-backend
- no-new-privileges:true
read_only: true
tmpfs:
- /tmp:rw,noexec,nosuid,nodev,size=64m
- /run:rw,noexec,nosuid,nodev,size=8m
pids_limit: 256
mem_limit: 768m
cpus: 1.5
secrets:
- jwt_key_current
- jwt_key_previous
- default_admin_password
- alert_webhook_secret
- sqlcipher_key
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:8092/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
depends_on:
socket-proxy:
condition: service_healthy
networks:
homelabarr:
name: homelabarr
driver: bridge
homelabarr-internal:
name: homelabarr-internal
driver: bridge
internal: true
volumes:
homelabarr-data:
name: homelabarr-data
driver: local
homelabarr-config:
name: homelabarr-config
driver: local
homelabarr-activity:
name: homelabarr-activity
driver: local