Files
Task_Reporter/docker-compose.minio.yml
egg 92834dbe0e feat: Migrate to MySQL and add unified environment configuration
## Database Migration (SQLite → MySQL)
- Add Alembic migration framework
- Add 'tr_' prefix to all tables to avoid conflicts in shared database
- Remove SQLite support, use MySQL exclusively
- Add pymysql driver dependency
- Change ad_token column to Text type for long JWT tokens

## Unified Environment Configuration
- Centralize all hardcoded settings to environment variables
- Backend: Extend Settings class in app/core/config.py
- Frontend: Use Vite environment variables (import.meta.env)
- Docker: Move credentials to environment variables
- Update .env.example files with comprehensive documentation

## Test Organization
- Move root-level test files to tests/ directory:
  - test_chat_room.py → tests/test_chat_room.py
  - test_websocket.py → tests/test_websocket.py
  - test_realtime_implementation.py → tests/test_realtime_implementation.py
- Fix path references in test_realtime_implementation.py

Breaking Changes:
- CORS now requires explicit origins (no more wildcard)
- All database tables renamed with 'tr_' prefix
- SQLite no longer supported

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-07 14:15:11 +08:00

78 lines
2.7 KiB
YAML

# MinIO Object Storage for Task Reporter
# Usage: docker-compose -f docker-compose.minio.yml up -d
# docker-compose -f docker-compose.minio.yml --env-file .env.docker up -d
#
# This configuration starts MinIO for local development.
# Access MinIO Console at: http://localhost:${MINIO_CONSOLE_PORT:-9001}
# S3 API endpoint at: http://localhost:${MINIO_API_PORT:-9000}
version: '3.8'
services:
minio:
image: minio/minio:latest
container_name: task-reporter-minio
ports:
- "${MINIO_API_PORT:-9000}:9000" # S3 API
- "${MINIO_CONSOLE_PORT:-9001}:9001" # MinIO Console
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER:-minioadmin}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-minioadmin}
command: server /data --console-address ":9001"
volumes:
- minio_data:/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
restart: unless-stopped
volumes:
minio_data:
driver: local
# ============================================================================
# Quick Start Guide
# ============================================================================
#
# 1. Start MinIO (with default settings):
# docker-compose -f docker-compose.minio.yml up -d
#
# 2. Start MinIO (with custom settings from .env.docker):
# docker-compose -f docker-compose.minio.yml --env-file .env.docker up -d
#
# 3. Access MinIO Console:
# Open http://localhost:9001 in your browser
# Login with MINIO_ROOT_USER / MINIO_ROOT_PASSWORD
#
# 4. The application will automatically create the bucket on startup
# (configured as 'task-reporter-files' in .env)
#
# 5. Stop MinIO:
# docker-compose -f docker-compose.minio.yml down
#
# 6. Remove all data:
# docker-compose -f docker-compose.minio.yml down -v
#
# ============================================================================
# Environment Variables
# ============================================================================
#
# MINIO_ROOT_USER - MinIO admin username (default: minioadmin)
# MINIO_ROOT_PASSWORD - MinIO admin password (default: minioadmin)
# MINIO_API_PORT - S3 API port (default: 9000)
# MINIO_CONSOLE_PORT - Web console port (default: 9001)
#
# ============================================================================
# Production Notes
# ============================================================================
#
# For production deployment:
# - Set secure MINIO_ROOT_USER and MINIO_ROOT_PASSWORD in .env.docker
# - Use external volume or persistent storage
# - Configure TLS/HTTPS
# - Set up proper backup policies
# - Consider MinIO distributed mode for high availability
#