Skip to content

Commit 78938c3

Browse files
authored
Merge pull request #35 from joshdev8/chore/cleanup-quick-wins
Cleanup: prune .env, name project, add compose-validate CI
2 parents 03efe22 + 84494ed commit 78938c3

5 files changed

Lines changed: 84 additions & 82 deletions

File tree

.env.example

Lines changed: 41 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,45 @@
1-
## COPY THIS OR RENAME THIS FILE TO ".env" AND REPLACE WITH YOUR SPECIFIC VALUES
2-
## THESE ARE ALL DUMMY VALUES BUT GIVE YOU A GENERAL IDEA OF WHAT THEY SHOULD LOOK LIKE
3-
## for more information on configuration + env variable examples:
4-
## https://docs.linuxserver.io/images/docker-radarr/#docker-compose-recommended-click-here-for-more-info
5-
## (click relevant container for specific info)
6-
7-
# Basic Configuration
8-
PATH="/usr/local/sbin:/usr/local/bin"
9-
PUID=1000 # Find more about PUID/PGID at https://docs.linuxserver.io/general/understanding-puid-and-pgid
10-
PGID=999
11-
TZ=America/New_York # See more timezone options at https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
12-
USERDIR=/home/username # Path to your home directory or desired location.
13-
14-
# Plex Specific
15-
PLEX_ADVERTISE_IP=https://192.168.0.100:32400/ # Needed in Bridge Networking.
16-
PLEX_CLAIM=aksjdfw84348033 # Obtain from https://www.plex.tv/claim. Necessary for server token.
17-
PLEX_TOKEN=aoiwejfj9230403402 # Obtain from https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token/
18-
19-
# Optional Settings
20-
EMAIL=email@email.com
21-
PASSWORD=password123
22-
HTTP_USERNAME=fakeusername
23-
HTTP_PASSWORD=fakepassword
24-
DOMAIN=mycustomdomain.com
25-
DOMAINNAME=mycustomdomain.com
26-
27-
# Transmission Settings
28-
TRANSMISSION_USERNAME=username # Username for logging into transmission frontend
29-
TRANSMISSION_PASSWORD=password123 # Password for logging into transmission frontend
30-
31-
# OpenVPN Configuration
32-
## more info: https://haugene.github.io/docker-transmission-openvpn/
33-
OPENVPN_PROVIDER=PIA # (Private Internet Access)
34-
OPENVPN_CONFIG=ca_montreal # Optional line (update this to whichever location you prefer)
35-
OPENVPN_USERNAME=openvpnusername
36-
OPENVPN_PASSWORD=openvpnpassword123
37-
38-
# InfluxDB Setup and Operation
39-
DOCKER_INFLUXDB_INIT_MODE=setup
40-
DOCKER_INFLUXDB_INIT_USERNAME=administrator
41-
DOCKER_INFLUXDB_INIT_PASSWORD=password
42-
DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=034838492002jklasjdfasdf # not a real token
43-
DOCKER_INFLUXDB_INIT_ORG=administrator
44-
DOCKER_INFLUXDB_INIT_BUCKET=telegraf
45-
DOCKER_INFLUXDB_INIT_RETENTION=2d # Valid units: ns, us, ms, s, m, h, d, w.
46-
DOCKER_INFLUXDB_INIT_PORT=8086
47-
DOCKER_INFLUXDB_INIT_HOST=influxdb
48-
49-
# Telegraf Configuration
50-
TELEGRAF_CFG_PATH=./telegraf/telegraf.conf
51-
52-
# Grafana Configuration
1+
## Copy this file to ".env" and fill in your values.
2+
## Only the variables in this file are actually read by docker-compose.yml.
3+
4+
# ============ Common (used by most services) ============
5+
# PUID/PGID: see https://docs.linuxserver.io/general/understanding-puid-and-pgid
6+
PUID=1000
7+
PGID=1000
8+
# Timezone: see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
9+
TZ=America/New_York
10+
# Parent directory where service configs and media live. Every bind mount
11+
# in docker-compose.yml is rooted here.
12+
USERDIR=/home/username
13+
14+
# ============ Plex ============
15+
# Obtain immediately before `docker compose up -d`. Claim tokens expire in
16+
# roughly 4 minutes. See https://www.plex.tv/claim
17+
PLEX_CLAIM=
18+
19+
# ============ Grafana ============
20+
# Host port to expose Grafana on. Defaults to 3000 if unset.
5321
GRAFANA_PORT=3000
5422

55-
# Radarr
56-
RADARR_URL=http://192.168.86.1:7878
57-
RADARR_API_KEY=1234523452345234jlksjdfla
58-
59-
# Sonarr
60-
SONARR_URL=http://192.168.86.1:8989
61-
SONARR_API_KEY=28939234kajsdjkfjalsd
62-
63-
# Kometa (Plex Meta Manager)
64-
PMM_PLEX_URL=http://192.168.86.1:32400
65-
PMM_PLEX_TOKEN=your_plex_token_here
66-
PMM_TMDB_API_KEY=your_tmdb_api_key_here
67-
PMM_TAUTULLI_URL=http://192.168.86.1:8181
68-
PMM_TAUTULLI_API_KEY=your_tautulli_api_key_here
69-
PMM_OMDB_API_KEY=your_omdb_api_key_here
70-
PMM_MDBLIST_API_KEY=your_mdblist_api_key_here
71-
PMM_TRAKT_CLIENT_ID=your_trakt_client_id_here
72-
PMM_TRAKT_CLIENT_SECRET=your_trakt_client_secret_here
73-
PMM_TRAKT_ACCESS_TOKEN=your_trakt_access_token_here
74-
PMM_TRAKT_REFRESH_TOKEN=your_trakt_refresh_token_here
75-
76-
# Tracearr
77-
DB_PASSWORD=your_secure_database_password
78-
JWT_SECRET=your_jwt_secret_here
79-
COOKIE_SECRET=your_cookie_secret_here
23+
# ============ Tracearr (required — stack will refuse to start if blank) ============
24+
# Use strong random strings, e.g. `openssl rand -base64 32`
25+
DB_PASSWORD=
26+
JWT_SECRET=
27+
COOKIE_SECRET=
28+
# Where the Tracearr UI is reachable from. Adjust if you front it with a
29+
# reverse proxy.
8030
CORS_ORIGIN=http://localhost:3001
8131

32+
# ============ Kometa / Plex Meta Manager ============
33+
# Only required if you plan to run Kometa against this stack. See README's
34+
# "Kometa Configuration" section.
35+
PMM_PLEX_URL=http://192.168.1.100:32400
36+
PMM_PLEX_TOKEN=
37+
PMM_TMDB_API_KEY=
38+
PMM_TAUTULLI_URL=http://192.168.1.100:8181
39+
PMM_TAUTULLI_API_KEY=
40+
PMM_OMDB_API_KEY=
41+
PMM_MDBLIST_API_KEY=
42+
PMM_TRAKT_CLIENT_ID=
43+
PMM_TRAKT_CLIENT_SECRET=
44+
PMM_TRAKT_ACCESS_TOKEN=
45+
PMM_TRAKT_REFRESH_TOKEN=
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Validate docker compose
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'docker-compose.yml'
7+
- '.env.example'
8+
- '.github/workflows/compose-validate.yml'
9+
push:
10+
branches: [main]
11+
paths:
12+
- 'docker-compose.yml'
13+
- '.env.example'
14+
- '.github/workflows/compose-validate.yml'
15+
16+
jobs:
17+
validate:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Create .env from example
23+
run: |
24+
cp .env.example .env
25+
# Tracearr's compose entries use the ${VAR:?must be set} form, so
26+
# blank placeholders in .env.example would fail interpolation. Fill
27+
# them with throwaway values just for the validation step.
28+
{
29+
echo "DB_PASSWORD=ci-validation"
30+
echo "JWT_SECRET=ci-validation"
31+
echo "COOKIE_SECRET=ci-validation"
32+
} >> .env
33+
34+
- name: docker compose config
35+
run: docker compose config --quiet

CLAUDE.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Radarr and Sonarr are deliberately on both `media_network` (so Seerr, Prowlarr,
3737

3838
**Volume paths are intentionally user-specific.** All bind mounts are rooted at `${USERDIR}` from `.env`. When advising the user, do not assume any particular host path layout — the README explicitly tells them to update paths to match their drive mounts.
3939

40-
**Prometheus config is orphaned.** `prometheus/prometheus.yml` exists and references `telegraf:9273` and `tautulli:8181` as scrape targets, but there is no `prometheus` service in `docker-compose.yml`. Treat it as a stub for users who want to add Prometheus themselves — don't assume metrics are being scraped today.
40+
**No Prometheus in the stack.** There is no `prometheus` service in `docker-compose.yml`. A starting-point config lives at `docs/prometheus.example.yml` for users who want to add Prometheus themselves — don't assume metrics are being scraped today.
4141

4242
**Transmission VPN is aspirational.** The README claims VPN support and `.env.example` has `OPENVPN_*` variables, but the active image is plain `linuxserver/transmission` with no VPN sidecar or `haugene/transmission-openvpn` config. If the user wants real VPN tunneling, that's a change, not a fix.
4343

@@ -56,8 +56,9 @@ The mounted config directory is `plex-meta-manager/config/`. Its structure is re
5656

5757
## Env var contract
5858

59-
`.env.example` is the source of truth for what `.env` needs. The values fall into three categories:
59+
`.env.example` is the source of truth for what `.env` needs, and every var in it is actually consumed by `docker-compose.yml`. The values fall into two categories:
6060

61-
1. **Hard-required** (stack won't start): `DB_PASSWORD`, `JWT_SECRET`, `COOKIE_SECRET` (all Tracearr).
62-
2. **Effectively required for the feature to work**: `PUID`/`PGID`/`TZ`/`USERDIR` (everything), `PLEX_CLAIM` (first-boot only), `PMM_*` (Kometa).
63-
3. **Documented but unused by the current compose file**: `OPENVPN_*`, `DOCKER_INFLUXDB_*`, `RADARR_*`, `SONARR_*`, `EMAIL`/`PASSWORD`/`HTTP_*`/`DOMAIN*`. These exist for the "not included but recommended" services in the README or aspirational features — don't add validation for them and don't assume the user has them set.
61+
1. **Hard-required** (stack won't start): `DB_PASSWORD`, `JWT_SECRET`, `COOKIE_SECRET` (all Tracearr — they use the `${VAR:?must be set}` fail-fast form).
62+
2. **Effectively required for the feature to work**: `PUID`/`PGID`/`TZ`/`USERDIR` (everything), `PLEX_CLAIM` (first-boot only), `GRAFANA_PORT` (defaults to 3000 if unset), `PMM_*` (Kometa).
63+
64+
If a user mentions an env var not in this list (e.g. `OPENVPN_*`, `RADARR_API_KEY`, `DOCKER_INFLUXDB_*`), it's from an older version of the stack — not consumed today.

docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: autoplexx
2+
13
services:
24
# ============ MEDIA SERVER ============
35
plex:

0 commit comments

Comments
 (0)