Add PDF reports, file uploads, admin auth, and comprehensive tests
Features: - PDF service for generating task reports with ReportLab-style formatting - Storage service for file uploads (local and S3-compatible) - Admin authentication middleware with JWT support - Admin user model and repository Infrastructure: - Updated Docker configuration for admin panel builds - Email service enhancements for task notifications - Updated router with admin and file upload routes - Environment configuration updates Tests: - Unit tests for handlers (auth, residence, task) - Unit tests for models (user, residence, task) - Unit tests for repositories (user, residence, task) - Unit tests for services (residence, task) - Integration test setup - Test utilities for mocking database and services Database: - Admin user seed data - Updated test data seeds 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -117,7 +117,7 @@ services:
|
||||
FCM_SERVER_KEY: ${FCM_SERVER_KEY}
|
||||
volumes:
|
||||
- ./push_certs:/certs:ro
|
||||
- api_uploads:/app/uploads
|
||||
- ./uploads:/app/uploads
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
@@ -133,6 +133,30 @@ services:
|
||||
networks:
|
||||
- mycrib-network
|
||||
|
||||
# MyCrib Admin Panel (Next.js)
|
||||
admin:
|
||||
build:
|
||||
context: .
|
||||
target: admin
|
||||
container_name: mycrib-admin
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "${ADMIN_PORT:-3000}:3000"
|
||||
environment:
|
||||
PORT: "3000"
|
||||
HOSTNAME: "0.0.0.0"
|
||||
NEXT_PUBLIC_API_URL: "${NEXT_PUBLIC_API_URL:-http://api:8000}"
|
||||
depends_on:
|
||||
api:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/admin/"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
networks:
|
||||
- mycrib-network
|
||||
|
||||
# MyCrib Worker (Background Jobs)
|
||||
worker:
|
||||
build:
|
||||
@@ -179,43 +203,9 @@ services:
|
||||
networks:
|
||||
- mycrib-network
|
||||
|
||||
# MyCrib Admin Panel
|
||||
admin:
|
||||
build:
|
||||
context: .
|
||||
target: admin
|
||||
container_name: mycrib-admin
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "${ADMIN_PORT:-9000}:9000"
|
||||
environment:
|
||||
# Server
|
||||
PORT: "8000" # Used to calculate admin port
|
||||
DEBUG: "${DEBUG:-false}"
|
||||
|
||||
# Database
|
||||
DB_HOST: db
|
||||
DB_PORT: "5432"
|
||||
POSTGRES_USER: ${POSTGRES_USER:-mycrib}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-mycrib_dev_password}
|
||||
POSTGRES_DB: ${POSTGRES_DB:-mycrib}
|
||||
DB_SSLMODE: "${DB_SSLMODE:-disable}"
|
||||
|
||||
# Security
|
||||
SECRET_KEY: ${SECRET_KEY:-dev-secret-key-change-in-production-min-32-chars}
|
||||
volumes:
|
||||
- admin_uploads:/app/uploads
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- mycrib-network
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
redis_data:
|
||||
api_uploads:
|
||||
admin_uploads:
|
||||
|
||||
networks:
|
||||
mycrib-network:
|
||||
|
||||
Reference in New Issue
Block a user