Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
189 lines (181 loc) · 8.18 KB
/
Copy pathdocker-compose.yml
File metadata and controls
189 lines (181 loc) · 8.18 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
# Muximux Docker Compose
# Usage: docker compose up -d
#
# Environment variables can be used in two ways:
# 1. Direct overrides: MUXIMUX_DATA, MUXIMUX_LISTEN, MUXIMUX_CONFIG (see below)
# 2. Config file expansion: Any ${VAR} in config.yaml is replaced with
# the environment variable value. Pass vars here and reference them
# in your config.yaml (e.g., client_secret: ${OIDC_CLIENT_SECRET}).
services:
muximux:
image: ghcr.io/mescon/muximux:latest
container_name: muximux
init: true
restart: unless-stopped
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
# The entrypoint starts as root, fixes ownership of /app/data and
# then drops to PUID/PGID. It needs these three to do that; without
# them the container exits with "su-exec: setgroups: Operation not
# permitted" before Muximux starts.
cap_add:
- CHOWN
- SETUID
- SETGID
ports:
- "8080:8080"
# Uncomment if using tls.domain or gateway_sites (the embedded
# Caddy binds 80 and 443 by default for auto-HTTPS via ACME):
# - "80:80" # HTTP→HTTPS redirect + ACME challenges
# - "443:443" # HTTPS
#
# Alternative for unprivileged-port-only setups: set
# server.gateway_listen: ":8443" in config.yaml and expose
# that port instead. Useful when fronting Muximux with another
# reverse proxy (Cloudflare Tunnel, an upstream Traefik, etc.)
# that terminates TLS and forwards plain HTTP.
# - "8443:8443"
volumes:
- ./data:/app/data
# If you have a legacy gateway Caddyfile from 3.0.x, mount it
# here once; the first boot under 3.1.0 auto-migrates it to
# server.gateway_sites: YAML and backs the original up with a
# .pre-3.1.0.bak suffix, then config.yaml is rewritten and the
# Caddyfile mount is no longer needed:
# - ./sites.Caddyfile:/app/data/sites.Caddyfile:ro
#
# Uncomment to expose the Docker socket so Muximux can scan
# the daemon for running containers (Settings → Discovery in
# 3.1.0+). The :ro flag does not limit Docker API calls: it only
# stops the container replacing the socket file. To keep Muximux
# read-only, put a socket proxy in front that only exposes the
# list/inspect endpoints (filter by endpoint: a GET can attach).
# Mount this only if you trust the dashboard's auth posture - the
# socket grants effective root on the host.
# The entrypoint auto-detects the socket's group ownership and
# grants the runtime user access; no extra env var needed.
# - /var/run/docker.sock:/var/run/docker.sock:ro
#
# Container lifecycle controls (opt-in, 3.1.1+). To let the
# dashboard start/stop/restart tracked containers, set
# discovery.docker.lifecycle_enabled: true in config.yaml; a plain
# socket mount (:ro or not) already accepts the writes, and a
# socket proxy must allow POST to those three endpoints. Muximux then starts/stops/restarts
# tracked containers (every action audit-logged) and never calls
# the parts of the API that pull, build, create, destroy, or exec
# into containers. See
# docs/wiki/docker-discovery.md#container-lifecycle-controls.
environment:
# ── User/Group ───────────────────────────────────────────────
- PUID=1000
- PGID=1000
# ── Docker socket access (rare overrides) ───────────────────
# The entrypoint auto-detects the docker socket's group GID
# when /var/run/docker.sock is mounted. These overrides are
# only needed for unusual setups: rootless Docker, a
# docker-socket-proxy sidecar, or a non-default mount path.
# - DOCKER_SOCKET=/var/run/docker.sock
# - DOCKER_GID=999
# ── Timezone ────────────────────────────────────────────────
- TZ=UTC
# ── Direct Overrides ────────────────────────────────────────
# These override the corresponding config.yaml values.
#
# Override the data directory (default: /app/data in Docker)
# - MUXIMUX_DATA=/app/data
#
# Override the listen address (default: :8080)
# - MUXIMUX_LISTEN=:8080
#
# Override the config file path (default: derived from data dir)
# - MUXIMUX_CONFIG=/app/data/config.yaml
#
# Automatically import muximux.*-labeled containers (3.2.0+).
# off (default) | add | update | sync. With sync, Muximux mirrors
# labeled containers exactly (adds, updates, and removes apps).
# Enabling this imports every labeled container with no review step,
# including gateway subdomains. See docs/wiki/docker-discovery.md.
# - MUXIMUX_DISCOVERY_AUTO_IMPORT=sync
# Auth method and OIDC straight from the environment (no config.yaml
# needed). Values stay in memory and show as locked in Settings.
# See docs/wiki/authentication.md#configuring-oidc-with-environment-variables.
# - MUXIMUX_AUTH_METHOD=oidc
# - MUXIMUX_OIDC_ISSUER_URL=https://auth.example.com/application/o/muximux/
# - MUXIMUX_OIDC_CLIENT_ID=muximux
# - MUXIMUX_OIDC_CLIENT_SECRET_FILE=/run/secrets/muximux_oidc_secret
# - MUXIMUX_OIDC_REDIRECT_URL=https://muximux.example.com/api/auth/oidc/callback
# - MUXIMUX_OIDC_ADMIN_GROUPS=muximux-admins
# ── Config File Variable Expansion ──────────────────────────
# These are available for ${VAR} expansion inside config.yaml.
# Example config.yaml usage: client_secret: ${OIDC_CLIENT_SECRET}
#
# OIDC authentication secrets
# - OIDC_CLIENT_ID=muximux
# - OIDC_CLIENT_SECRET=your-oidc-client-secret
# - OIDC_ISSUER_URL=https://auth.example.com
# - OIDC_REDIRECT_URL=https://muximux.example.com/auth/callback
#
# API key for external access (auth bypass rules)
# - MUXIMUX_API_KEY=your-api-key-here
#
# Builtin auth password hash (bcrypt)
# - ADMIN_PASSWORD_HASH=$$2a$$10$$...
#
# TLS settings (for auto-HTTPS or manual certs)
# - TLS_DOMAIN=muximux.example.com
# - TLS_EMAIL=admin@example.com
# - TLS_CERT=/app/data/cert.pem
# - TLS_KEY=/app/data/key.pem
#
# App URLs (useful for varying between environments)
# - PLEX_URL=http://plex:32400
# - SONARR_URL=http://sonarr:8989
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:8080/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
# ─── Discovery via Docker labels (3.1.0+) ──────────────────────
#
# Any service you label with muximux.* keys appears in Muximux's
# Discover modal (Settings > Discovery) pre-filled for one-click
# import -- or, with MUXIMUX_DISCOVERY_AUTO_IMPORT /
# discovery.docker.auto_import enabled, is imported automatically
# with no click. The example below shows the full label set; you can
# omit the ones you don't need. See the docker-discovery wiki
# page for the full reference and per-platform setup.
#
# Sketch:
#
# services:
# sonarr:
# image: linuxserver/sonarr
# labels:
# # Tracking
# - muximux.discovery.id=sonarr-stable
# # App fields
# - muximux.app.name=Sonarr
# - muximux.app.icon=sonarr
# - muximux.app.group=Media
# - muximux.app.port=8989
# - muximux.app.scheme=http
# - muximux.app.proxy=true
# - muximux.app.color=#3498db
# - muximux.app.min_role=user
# - muximux.app.allowed_groups=family,admins
# # Gateway (subdomain + auth gate)
# - muximux.app.gateway.domain=sonarr.example.com
# - muximux.gateway.tls=auto
# - muximux.gateway.require_auth=true
# Optional: Build from source instead of using pre-built image
# services:
# muximux:
# build:
# context: .
# dockerfile: Dockerfile
# args:
# VERSION: "3.2.0"
# ...