Galleria is a modern, self-hosted photography portfolio platform
8.3K
A modern photography portfolio website built with React 19, TypeScript, Express 5, and SQLite. Features optimized image delivery, admin panel, analytics tracking, and responsive design.
š Live Demo: tedcharles.netā
Pre-built Docker images are available on Docker Hub: hub.docker.com/r/tedcharles/galleriaā
# Pull latest production image
docker pull tedcharles/galleria:latest
# Pull latest development image
docker pull tedcharles/galleria:dev
# Pull specific version
docker pull tedcharles/galleria:v1.0.1
Quick Start with Docker Hub image:
# Create data directory
mkdir -p ~/galleria-data
# Run with Docker
docker run -d \
--name galleria \
-p 3000:3000 \
-p 3001:3001 \
-v ~/galleria-data:/data \
-e DATA_DIR=/data \
-e FRONTEND_DOMAIN=http://localhost:3000 \
-e BACKEND_DOMAIN=http://localhost:3001 \
tedcharles/galleria:latest
Available tags:
:latest - Latest production build:dev - Latest development build:vX.Y.Z - Specific version (e.g., :v1.2.3)Single container deployment with PM2 process management.
git clone https://github.com/theodorecharles/Galleria.git
cd Galleria
mkdir -p ~/galleria-data
docker-compose.yml:environment:
- DATA_DIR=/data
- FRONTEND_DOMAIN=http://localhost:3000 # or https://www.yourdomain.com
- BACKEND_DOMAIN=http://localhost:3001 # or https://api.yourdomain.com
volumes:
- ~/galleria-data:/data
docker-compose up -d --build
git clone https://github.com/theodorecharles/Galleria.git
cd Galleria
npm install
cd backend && npm install
cd ../frontend && npm install
cd ..
npm run dev
http://localhost:3000 - the setup wizard will guide you through initial configuration.# Build both frontend and backend
npm run build
# Install PM2 globally
npm install -g pm2
# Start services
pm2 start ecosystem.config.cjs
pm2 save
pm2 startup
See Docker Deploymentā section above.
Via GitHub Actions:
Push to master (prod) or devel branch, and GitHub Actions automatically deploys.
Manual deployment:
git pull origin <branch>
./restart.sh
The restart.sh script handles:
Galleria supports hardware-accelerated video encoding for faster video processing using your GPU.
Prerequisites:
Enable in docker-compose.yml:
services:
app:
runtime: nvidia # Enable NVIDIA runtime
environment:
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=compute,video,utility
Hardware encoding automatically detects and uses available GPU encoders on your system. No special configuration needed - just ensure GPU drivers are installed.
Performance: Hardware encoding can be 5-10x faster than software encoding, especially for high-resolution videos.
Configuration is managed through environment variables or the admin panel - you don't need to edit config files directly.
Configure via environment variables in docker-compose.yml:
environment:
- DATA_DIR=/data
- FRONTEND_DOMAIN=http://localhost:3000 # or https://www.yourdomain.com
- BACKEND_DOMAIN=http://localhost:3001 # or https://api.yourdomain.com
Copy the example environment file:
cp .env.example .env
Edit .env with your settings:
FRONTEND_DOMAIN=http://localhost:3000
BACKEND_DOMAIN=http://localhost:3001
DATA_DIR=./data
After initial setup, all configuration is managed through the Admin Panel at /admin ā Settings.
Google OAuth is completely optional. You can use password-based authentication without any OAuth setup.
To enable Google OAuth login:
http://localhost:3001/api/auth/google/callbackhttps://api.yourdomain.com/api/auth/google/callback/adminView logs (PM2):
pm2 logs
View logs (Docker):
docker exec galleria pm2 logs
Restart services:
pm2 restart all
# or
docker-compose restart
Optimize images:
node scripts/optimize_all_images.js
galleria/
āāā backend/ # Express API
ā āāā src/
ā ā āāā server.ts # Main server
ā ā āāā routes/ # API endpoints
ā āāā package.json
āāā frontend/ # React app
ā āāā src/
ā āāā package.json
āāā data/ # Data directory (not in Git)
ā āāā config.json # Configuration (auto-generated, managed via admin panel)
ā āāā photos/ # Original photos
ā āāā optimized/ # Generated images
ā āāā gallery.db # SQLite database
āāā .env.example # Environment variables template (copy to .env)
āāā scripts/ # Utility scripts
āāā Dockerfile # Docker container
āāā docker-compose.yml # Docker Compose config
āāā package.json # Root dependencies
Galleria supports 37 languages with full UI and SEO localization:
The selected language applies to:
Built by Ted Charlesā with React, TypeScript, and Express
Content type
Image
Digest
sha256:612c76758ā¦
Size
672.8 MB
Last updated
3 months ago
docker pull tedcharles/galleria