Add new build and database setup scripts to package.json for production

This commit is contained in:
2025-08-19 23:21:11 +01:00
parent 3704a70575
commit a40a2c022d
9 changed files with 896 additions and 0 deletions

40
env.production.example Normal file
View File

@ -0,0 +1,40 @@
# Production Environment Configuration for DigitalOcean
# Database Configuration (will be replaced by DigitalOcean DATABASE_URL)
DATABASE_URL="mysql://username:password@hostname:port/database_name"
# JWT Secret for authentication (SET THIS IN DIGITALOCEAN DASHBOARD)
JWT_SECRET="your-super-secret-jwt-key-here-change-this-in-production"
# App Configuration
NODE_ENV="production"
PORT="3000"
# 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"
# CORS Configuration
CORS_ORIGIN="https://your-frontend-domain.ondigitalocean.app"
# 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=""