2.5 KiB
Mischkomposition Photography Portfolio
This is the code repository for the photography portfolio of Tom Misch ("Mischkomposition"). The project features a fast static frontend (based on HTML5 UP Multiverse) powered by a robust Node.js + SQLite backend and Nextcloud integration.
Features
- Nextcloud Integration: Photos placed into the Nextcloud directory are automatically detected.
- Client Separation: Guests see the public portfolio, while logged-in clients see their designated, private sub-folders.
- Auto-Thumbnails: Automatic resizing and EXIF extraction (shutter speed, ISO, aperture) for fast loading times.
- Admin Dashboard: Manage users, assign private folders, and trigger One-Click container updates directly from the browser.
- 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.
To deploy on a NAS or Linux server, adjust the docker-compose.yml to match your Nextcloud mount:
services:
photography-website:
image: ghcr.io/kroonk/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=ghcr.io/kroonk/photography:latest
- SYNC_CONTAINER=photography-website
volumes:
- /path/to/nextcloud/data:/app/public/images/fulls:ro
- thumbs:/app/public/images/thumbs
- database:/app/data
- /var/run/docker.sock:/var/run/docker.sock
- ~/.docker/config.json:/root/.docker/config.json:ro
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:
node -e "const bcrypt = require('bcryptjs'); console.log(bcrypt.hashSync('your-admin-password', 10));"
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
- Originally based on a Jekyll template.
- UI Design by AJ / HTML5 UP.
- Enhanced with Node.js authentication, SQLite database management, and Docker integrations by Tom Misch.