saveinmed/backend/.env.example
Tiago Yamamoto 916225f19e feat(backend): add configurable CORS and optimize Dockerfile
- Add CORS_ORIGINS env var for multiple domains support
- Update config.go with CORSOrigins field and getEnvStringSlice helper
- Rewrite CORS middleware with CORSWithConfig for dynamic origins
- Update server.go to use configurable CORS
- Update .env.example with all configuration variables
- Optimize Dockerfile: switch to distroless image, update port to 8214
2025-12-19 17:34:30 -03:00

32 lines
842 B
Text

# ============================================
# SaveInMed Backend - Environment Variables
# ============================================
# Application Settings
APP_NAME=saveinmed-performance-core
PORT=8214
# Database Configuration
DATABASE_URL=postgres://user:password@host:port/dbname?sslmode=disable
DB_MAX_OPEN_CONNS=25
DB_MAX_IDLE_CONNS=25
DB_CONN_MAX_IDLE=15m
# JWT Authentication
JWT_SECRET=your-secret-key-here
JWT_EXPIRES_IN=24h
# MercadoPago Payment Gateway
MERCADOPAGO_BASE_URL=https://api.mercadopago.com
MARKETPLACE_COMMISSION=2.5
# CORS Configuration
# Comma-separated list of allowed origins, use * for all
# Examples:
# CORS_ORIGINS=*
# CORS_ORIGINS=https://example.com
# CORS_ORIGINS=https://app.saveinmed.com,https://admin.saveinmed.com,http://localhost:3000
CORS_ORIGINS=*
# Testing (Optional)
# SKIP_DB_TEST=1