Skip to content

ImageMaid: new service - #396

Draft
jackspiering wants to merge 1 commit into
mainfrom
t3code/add-imagemaid-service
Draft

jackspiering wants to merge 1 commit into
mainfrom
t3code/add-imagemaid-service

Conversation

@jackspiering

Copy link
Copy Markdown
Collaborator

Description

Adds ImageMaid (kometateam/imagemaid), a scheduled script that removes unused poster and background images from the metadata folder of a Plex server.

  • The upstream project is not archived (v1.2.2 released 2026-10-12), and kometateam/imagemaid:latest is the image its documentation uses.
  • The image ships no Tailscale, so a sidecar is justified. It carries ImageMaid's outgoing traffic, for example to the Plex API of another stack that publishes no host ports. ImageMaid also needs the Plex data folder on the same host, so the sidecar adds no more than Tailnet access to the Plex API and the notification endpoints.
  • No web interface: the stack has no Serve configuration, no ./config folder, and no ports block, as in Recyclarr.
  • SCHEDULE is set (05:00|weekly(sunday)) and MODE=report is the default. Without a schedule ImageMaid runs once and exits, and restart: always would then run it again and again. Nothing is changed until the user picks move or remove.
  • The Plex data folder is mounted from PLEX_DATA_DIR (default: the folder of the Plex stack in this repository) with create_host_path: false, so Docker does not create an empty folder.
  • The image has no health check and no pgrep. The check runs pidof python3, because ImageMaid is the only python3 process.

Upstream Compose instructions (docs and README) are a single-container example with /config and /plex volumes. This stack adds the sidecar and the variables above, and documents each difference in the service README.

Related Issues

  • None.

Verification

  • docker compose config --quiet from the service directory, with dummy values for required variables (the stack has none)
  • The stack started, Tailscale is healthy, and the application is healthy. Not applicable: reachability through the Tailnet, because there is no web interface.
  • The main function works, and its data survives a restart. Tested against a throwaway Plex server (linuxserver/plex, fresh database, no library): a scheduled start shows the schedule in the log, and a run in report mode copied the database and found 0 bloat images. A planted image file was moved in move mode and restored in restore mode. ./<service>-data/config survived docker compose down and up -d. A missing PLEX_DATA_DIR makes Compose fail with bind source path does not exist.
  • rumdl check --config .markdownlint.yml . (0.2.78) on the whole repository, and git diff --check origin/main

Not tested:

  • Downloading the database through the Plex API (PLEX_URL and PLEX_TOKEN): the throwaway Plex server was unclaimed and has no token. The Plex device of another stack on a Tailnet was not available either.
  • A run against a real library with Kometa overlays, and remove mode.
  • Serve: not used. The Tailscale log shows no certificate request.

Impact on existing users

  • None.

Checklist

  • I have performed a self-review of my code and followed the templates structure.
  • I did not commit a working auth key, password, token, or other credential.
  • The service README uses the headings of the template, in the same order, and is up to date.
  • I added, removed, or renamed the service in the root README.md, in alphabetical order, or this PR does not change the list of services.

Additional Context

  • The container runs as root, as upstream documents, so files in ./imagemaid-data/config belong to root.
  • Restarting both containers with docker compose restart failed once in testing: the application container could not join the namespace of the restarted tailscale container. docker compose down and up -d worked. This is the known Docker behaviour for network_mode: service:..., and is not specific to this stack.

@jackspiering jackspiering added the new service request to add a new service label Oct 15, 2026
@jackspiering jackspiering self-assigned this Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new service request to add a new service

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant