Initial commit: VRBattles API

This commit is contained in:
root
2026-01-20 05:41:25 +00:00
commit c26a1820d5
42 changed files with 6187 additions and 0 deletions

55
env.example Normal file
View File

@@ -0,0 +1,55 @@
# =============================================================================
# VRBattles API Environment Configuration
# Copy this file to .env and fill in your values
# =============================================================================
# Database Configuration
# For Dokploy: Use the internal service name if running PostgreSQL in same compose
DATABASE_URL=postgres://postgres:your_secure_password@db:5432/vrbattles
# JWT Authentication
# IMPORTANT: Generate a secure random string for production!
# Example: openssl rand -base64 32
JWT_SECRET=your-super-secret-jwt-key-change-this
JWT_EXPIRATION_HOURS=24
# Server Configuration
HOST=0.0.0.0
PORT=3000
ENVIRONMENT=production
# Logging
# Options: error, warn, info, debug, trace
RUST_LOG=vrbattles_api=info,tower_http=info
# Frontend URL (for CORS and email links)
FRONTEND_URL=https://yourdomain.com
# =============================================================================
# Optional: S3 Storage (for file uploads)
# If not configured, files are stored locally in ./uploads
# =============================================================================
# S3_BUCKET=your-bucket-name
# S3_REGION=us-east-1
# AWS_ACCESS_KEY_ID=your-access-key
# AWS_SECRET_ACCESS_KEY=your-secret-key
# Local uploads (when S3 is not configured)
UPLOAD_PATH=./uploads
BASE_URL=https://api.yourdomain.com
# =============================================================================
# Optional: Email Configuration (for notifications)
# =============================================================================
# SMTP_HOST=smtp.example.com
# SMTP_PORT=587
# SMTP_USERNAME=your-smtp-user
# SMTP_PASSWORD=your-smtp-password
# FROM_EMAIL=noreply@yourdomain.com
# =============================================================================
# PostgreSQL (for docker-compose db service)
# =============================================================================
POSTGRES_USER=postgres
POSTGRES_PASSWORD=your_secure_password
POSTGRES_DB=vrbattles