- TypeScript 98.6%
- CSS 0.9%
- JavaScript 0.3%
- Dockerfile 0.2%
|
Some checks failed
CI / docker-build (push) Failing after 3s
Reviewed-on: #57 |
||
|---|---|---|
| .forgejo/workflows | ||
| deploy | ||
| docs | ||
| exports | ||
| prisma | ||
| public | ||
| reviews | ||
| scripts | ||
| src | ||
| vendor | ||
| .dockerignore | ||
| .DS_Store | ||
| .env.example | ||
| .gitignore | ||
| .gitmodules | ||
| .sops.yaml | ||
| AGENTS.md | ||
| CLAUDE.md | ||
| components.json | ||
| Dockerfile | ||
| eslint.config.mjs | ||
| next-env.d.ts | ||
| next.config.ts | ||
| package-lock.json | ||
| package.json | ||
| postcss.config.mjs | ||
| prisma.config.ts | ||
| README.md | ||
| tsconfig.json | ||
Media Organizer
Media Organizer is a Next.js media library app for browsing imported media, managing favorites/trash/custom collections, and importing folders into the library database.
The media storage path stays /media/scraper for compatibility with existing database records and external tools such as Immich.
Docker Compose
Create a local environment file from the example:
cp deploy/media-organizer.env.example deploy/media-organizer.env
Set POSTGRES_PASSWORD, DATABASE_URL, and SESSION_SECRET before the first start.
Start PostgreSQL, run Prisma migrations, and start the web UI:
docker compose -f deploy/docker-compose.yml up --build
After the first migration, create an admin user from the web container or a local shell with DATABASE_URL set:
npm run create-admin -- <gebruikersnaam> <wachtwoord>
The Compose stack publishes the web service on 172.18.0.1:3107:3000. Caddy can proxy that to https://media.jp-visser.nl. Health endpoints are available at /health, /api/health, and /api/ready.
Runtime Paths
LIBRARY_MEDIA_ROOT defaults to /media/scraper and should stay there unless the database paths are migrated deliberately. The Docker Compose stack bind-mounts the host /media/scraper directory at the same container path and mounts /mnt/nas/ssd, /mnt/nas/public, and /mnt/nas/multimedia read-only for existing import-source paths.
Secrets (SOPS + age)
On the scrum4me-srv host the runtime env is not hand-edited. The real values live encrypted in deploy/media-organizer.env.sops (SOPS + age), committed to this repo. At deploy time the host decrypts it to deploy/media-organizer.env, so the .sops file is the single source of truth and the plaintext env is a derived, gitignored artifact.
- Edit or add a secret with
npm run secrets:edit, then commit, push, and redeploy. - View decrypted values with
npm run secrets:view. - Rotate the DB password on the live DB first, then update both
POSTGRES_PASSWORDand the password insideDATABASE_URL.