Files
picpeak/docker-compose.yml
T
paul a209796b16
Mirror to GitHub / mirror (push) Successful in 26s
Test and Lint / backend-test (push) Successful in 1m15s
continuous-integration/drone/push Build is passing
Test and Lint / frontend-test (push) Successful in 2m2s
Version and Release / version-bump (push) Failing after 1m17s
Version and Release / trigger-drone (push) Has been skipped
refactor: complete configuration cleanup and consistency fixes
- Create docker-compose.dev.yml with Mailhog for development email testing
- Standardize all configurations to use PORT=3001 for backend
- Fix database service naming (postgres → db) across all files
- Add missing BACKEND_URL environment variable to all configs
- Update .env examples to match actual Docker setup requirements
- Remove orphaned postgres-init directory (Umami handles its own DB)
- Update README roadmap: mark gallery feedback as implemented, add multi-admin support
- Update deployment guide with development setup instructions
- Fix frontend Dockerfile.dev for proper hot-reload development
- Remove unused files (wedding-photos.db, frontend/README.md)

This ensures all configuration files are consistent and aligned with the deployment guide.
2025-07-24 21:13:52 +02:00

93 lines
2.2 KiB
YAML

version: '3.8'
services:
# PostgreSQL Database
db:
image: postgres:15-alpine
container_name: picpeak-postgres
environment:
POSTGRES_DB: ${DB_NAME:-picpeak}
POSTGRES_USER: ${DB_USER:-picpeak}
POSTGRES_PASSWORD: ${DB_PASSWORD:-picpeak}
volumes:
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-picpeak}"]
interval: 10s
timeout: 5s
retries: 5
# Backend API
backend:
build: ./backend
container_name: picpeak-backend
depends_on:
db:
condition: service_healthy
environment:
NODE_ENV: production
PORT: 3001
DATABASE_CLIENT: pg
DB_HOST: db
DB_PORT: 5432
DB_NAME: ${DB_NAME:-picpeak}
DB_USER: ${DB_USER:-picpeak}
DB_PASSWORD: ${DB_PASSWORD:-picpeak}
env_file:
- .env
volumes:
- ./storage:/app/storage
- ./data:/app/data
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3001/api/health"]
interval: 30s
timeout: 10s
retries: 3
# Frontend
frontend:
build:
context: ./frontend
args:
VITE_API_URL: ${VITE_API_URL:-/api}
VITE_UMAMI_URL: ${VITE_UMAMI_URL}
VITE_UMAMI_WEBSITE_ID: ${VITE_UMAMI_WEBSITE_ID}
container_name: picpeak-frontend
depends_on:
- backend
restart: unless-stopped
# Nginx Reverse Proxy
nginx:
image: nginx:alpine
container_name: picpeak-nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./certbot/conf:/etc/letsencrypt
- ./certbot/www:/var/www/certbot
depends_on:
- frontend
- backend
restart: unless-stopped
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
# Certbot for SSL
certbot:
image: certbot/certbot
container_name: picpeak-certbot
volumes:
- ./certbot/conf:/etc/letsencrypt
- ./certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
volumes:
postgres_data:
networks:
default:
name: picpeak-network