Enhance Dockerfile configurations for API and frontend, including MySQL client installation, improved TypeScript build process, and a custom startup script for database migration. Update production environment example with refined database and application settings.

This commit is contained in:
2025-08-20 04:22:48 +01:00
parent 1759bd623a
commit d6dd571f5c
9 changed files with 1079 additions and 44 deletions

View File

@ -1,40 +1,35 @@
# Production Environment Configuration for DigitalOcean
# ScriptShare Production Environment Configuration
# Database Configuration (will be replaced by DigitalOcean DATABASE_URL)
DATABASE_URL="mysql://username:password@hostname:port/database_name"
# Application Settings
APP_NAME=ScriptShare
APP_URL=https://your-domain.com
ANALYTICS_ENABLED=true
NODE_ENV=production
# JWT Secret for authentication (SET THIS IN DIGITALOCEAN DASHBOARD)
JWT_SECRET="your-super-secret-jwt-key-here-change-this-in-production"
# Database Configuration
DB_HOST=scriptshare-db
DB_PORT=3306
DB_NAME=scriptshare
DB_USER=scriptshare_user
DB_PASSWORD=ScriptShare_App_2024_Secure!
DB_ROOT_PASSWORD=ScriptShare_Root_2024_Secure
DATABASE_URL=mysql://scriptshare_user:ScriptShare_App_2024_Secure!@scriptshare-db:3306/scriptshare
# App Configuration
NODE_ENV="production"
PORT="3000"
# Security
JWT_SECRET=production-super-secret-jwt-key-scriptshare-2024-change-this
# Frontend Configuration
VITE_APP_NAME="ScriptShare"
VITE_APP_URL="https://your-app-domain.ondigitalocean.app"
VITE_API_URL="https://your-api-domain.ondigitalocean.app/api"
VITE_ANALYTICS_ENABLED="true"
# API Configuration
API_PORT=3001
API_URL=http://localhost:3001
CORS_ORIGIN=http://localhost
# CORS Configuration
CORS_ORIGIN="https://your-frontend-domain.ondigitalocean.app"
# Frontend Configuration
FRONTEND_PORT=80
FRONTEND_URL=http://localhost
VITE_APP_NAME=ScriptShare
VITE_APP_URL=http://localhost
VITE_ANALYTICS_ENABLED=true
VITE_API_URL=http://localhost:3001
# Admin User Configuration (for initial setup only)
ADMIN_EMAIL="admin@yourcompany.com"
ADMIN_USERNAME="admin"
ADMIN_PASSWORD="change-this-secure-password"
# Optional: Rate Limiting
RATE_LIMIT_ENABLED="true"
RATE_LIMIT_WINDOW_MS="900000"
RATE_LIMIT_MAX_REQUESTS="100"
# Optional: File Upload Configuration
MAX_FILE_SIZE="10485760"
UPLOAD_PATH="/tmp/uploads"
# Optional: Email Configuration (if needed)
SMTP_HOST=""
SMTP_PORT=""
SMTP_USER=""
SMTP_PASS=""
# Container Configuration
COMPOSE_PROJECT_NAME=scriptshare