Files
picpeak/docker-compose.dev.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

100 lines
2.7 KiB
YAML

# docker-compose.dev.yml - Development configuration with Mailhog
version: '3.8'
services:
# PostgreSQL Database
db:
image: postgres:15-alpine
container_name: picpeak-postgres-dev
environment:
POSTGRES_DB: ${DB_NAME:-picpeak}
POSTGRES_USER: ${DB_USER:-picpeak}
POSTGRES_PASSWORD: ${DB_PASSWORD:-picpeak}
volumes:
- postgres_data_dev:/var/lib/postgresql/data
ports:
- "5432:5432" # Expose for local development tools
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-dev
depends_on:
db:
condition: service_healthy
environment:
NODE_ENV: development
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}
JWT_SECRET: ${JWT_SECRET:-dev-secret-DO-NOT-USE-IN-PRODUCTION}
ADMIN_URL: ${ADMIN_URL:-http://localhost:3005}
FRONTEND_URL: ${FRONTEND_URL:-http://localhost:3005}
BACKEND_URL: ${BACKEND_URL:-http://localhost:3001}
# Email via Mailhog
SMTP_HOST: mailhog
SMTP_PORT: 1025
SMTP_SECURE: "false"
SMTP_USER: ""
SMTP_PASS: ""
EMAIL_FROM: ${EMAIL_FROM:-noreply@localhost}
volumes:
- ./backend:/app
- /app/node_modules # Prevent node_modules from being overwritten
- ./storage:/app/storage
- ./data:/app/data
ports:
- "3001:3001"
restart: unless-stopped
command: npm run dev
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3001/api/health"]
interval: 30s
timeout: 10s
retries: 3
# Frontend
frontend:
build:
context: ./frontend
dockerfile: Dockerfile.dev
container_name: picpeak-frontend-dev
depends_on:
- backend
environment:
- VITE_API_URL=${VITE_API_URL:-http://localhost:3001/api}
- VITE_UMAMI_URL=${VITE_UMAMI_URL}
- VITE_UMAMI_WEBSITE_ID=${VITE_UMAMI_WEBSITE_ID}
volumes:
- ./frontend:/app
- /app/node_modules # Prevent node_modules from being overwritten
ports:
- "3005:3005"
restart: unless-stopped
command: npm run dev -- --host 0.0.0.0 --port 3005
# Mailhog - Email testing for development
mailhog:
image: mailhog/mailhog:latest
container_name: picpeak-mailhog
ports:
- "1025:1025" # SMTP server
- "8025:8025" # Web UI
restart: unless-stopped
volumes:
postgres_data_dev:
networks:
default:
name: picpeak-dev-network