Fix Photography deploy metadata and SQLite migration
All checks were successful
Build & Push Docker Image to Gitea Registry / build-and-push (push) Successful in 33s

This commit is contained in:
Kroonk
2026-05-20 18:54:10 +02:00
parent e6a11f2eed
commit 64fe667240
6 changed files with 112 additions and 66 deletions

View File

@@ -11,21 +11,19 @@ The project features a fast static frontend (based on HTML5 UP Multiverse) power
- **Light/Dark Mode:** Dynamic theme toggle saving preferences in the browser.
## Deployment Setup (Docker)
This repository is automatically built into a Docker container via GitHub Actions.
This repository is automatically built into a Docker container via Gitea Actions and pushed to the local Gitea container registry.
To deploy on a NAS or Linux server, adjust the `docker-compose.yml` to match your Nextcloud mount:
```yaml
services:
photography-website:
photography:
image: git.mischlabs.de/mrdiderot/photography:latest
container_name: photography-website
ports:
- "8090:8090"
environment:
- JWT_SECRET=replace-with-a-long-random-secret
- INITIAL_ADMIN_USERNAME=MrDiderot
- INITIAL_ADMIN_PASSWORD=Start123
- FULLS_DIR=/app/public/images/fulls
- THUMBS_DIR=/app/public/images/thumbs
- SYNC_IMAGE=git.mischlabs.de/mrdiderot/photography:latest
@@ -40,12 +38,14 @@ services:
Run `docker compose up -d` to launch the site.
Change the initial admin password after the first login. If you prefer not to store the initial password in `docker-compose.yml`, create a bcrypt hash and use `INITIAL_ADMIN_PASSWORD_HASH` instead:
For a fresh installation, create the initial admin with explicit environment variables only once. Use a bcrypt hash instead of storing a plain password in `docker-compose.yml`:
```bash
node -e "const bcrypt = require('bcryptjs'); console.log(bcrypt.hashSync('your-admin-password', 10));"
```
Then start once with `INITIAL_ADMIN_USERNAME=MrDiderot` and `INITIAL_ADMIN_PASSWORD_HASH=<hash>`. Existing installations keep their SQLite users in the persistent `database` volume.
The admin dashboard includes a sync button that pulls `SYNC_IMAGE` and restarts `SYNC_CONTAINER`. This requires the Docker socket mount shown above.
## Credits & License