The repository includes aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/xcoder-es/media-cleaner-pro/llms.txt
Use this file to discover all available pages before exploring further.
docker-compose.yml that wires together the Rust API backend, an Astro frontend container, and an optional Temporal workflow cluster backed by PostgreSQL. This setup is useful for environments where you want process isolation, easy restarts, and a clean separation between the API and UI layers — or where you plan to plug in Temporal for durable, observable workflow execution.
Services Overview
The Compose file defines five services:| Service | Image / Build | Host Port | Description |
|---|---|---|---|
mediacleaner-api | Built from Dockerfile | 8081 → 8080 | The Rust processing backend; handles all pipeline logic and serves the REST API |
frontend | Built from ./frontend/Dockerfile | 4321 → 4321 | The Astro web UI; communicates with the API via PUBLIC_API_URL |
temporal | temporalio/auto-setup:1.24.2 | 7233, 8233 | Temporal workflow server for durable job execution |
temporal-ui | temporalio/ui:2.51.1 | 8080 → 8080 | Temporal’s browser dashboard |
postgresql | postgres:16-alpine | 5432 → 5432 | PostgreSQL backing store for Temporal’s persistence layer |
mediacleaner bridge network.
The
temporal, temporal-ui, and postgresql services are optional. If you only need the image cleaning pipeline, comment those three services out of docker-compose.yml and remove the depends_on: temporal block from mediacleaner-api. The API runs perfectly without a Temporal server.Deployment
Configure environment variables
Copy the example file and open it in your editor:At minimum, set Other variables you may want to adjust:
SOURCE_DIR and DEST_DIR to the paths inside the container where your media will live. The defaults map to the ./data volume already configured in the Compose file:| Variable | Default | Description |
|---|---|---|
RUST_LOG | info | Log verbosity (error, warn, info, debug, trace) |
SERVER_HOST | 0.0.0.0 | Bind address inside the container |
SERVER_PORT | 8080 | Internal HTTP port (mapped to 8081 on the host) |
HAMMING_THRESHOLD | 4 | Perceptual similarity tolerance (0–64, lower = stricter) |
WORKER_THREADS | 0 | 0 uses all available CPU cores |
TEMPORAL_HOST | temporal:7233 | Temporal server address (optional) |
Mount your media directory
Open Uncomment and edit the line that matches your operating system, replacing the host path with the actual location of your image library. The
docker-compose.yml and locate the volumes block under mediacleaner-api. The file includes ready-made commented examples for each OS::ro flag mounts the source as read-only so MediaCleaner Pro never modifies your originals in-place.Start the stack
mediacleaner-api and frontend images on the first run. Subsequent starts reuse the cached layers.To follow logs from all services:Open the interfaces
Once all containers are healthy, the following endpoints are available:
The OpenAPI spec for the backend is available at
| Interface | URL |
|---|---|
| MediaCleaner API | http://127.0.0.1:8081 |
| Astro Frontend | http://127.0.0.1:4321 |
| Temporal UI | http://127.0.0.1:8080 |
http://127.0.0.1:8081/api/openapi.json.mediacleaner-api Service Reference
The core service definition fromdocker-compose.yml:
./data bind mount at /data is where the API reads from SOURCE_DIR and writes organized output to DEST_DIR. Any additional media volumes you mount alongside it (e.g. /media) can then be referenced from the UI’s directory browser or set in .env.
Environment Variables
These variables are passed directly to the container via theenvironment block:
| Variable | Value in Compose | Description |
|---|---|---|
RUST_LOG | info | Tracing log level for the Rust binary |
SERVER_HOST | 0.0.0.0 | Binds to all interfaces inside the container |
SERVER_PORT | 8080 | Internal port; mapped to 8081 on the host |
SOURCE_DIR | /data/source | Container-absolute path for input images |
DEST_DIR | /data/output | Container-absolute path for organized output |
TEMPORAL_HOST | temporal:7233 | Resolves to the temporal service on the shared Docker network (optional) |