refactor: rename PORT to BACKEND_PORT and API_HOST to BACKEND_HOST
This commit is contained in:
parent
924255fdfb
commit
0693e30922
2 changed files with 21 additions and 21 deletions
|
|
@ -1,30 +1,30 @@
|
|||
# Environment variables for GoHorse Jobs Backend
|
||||
# =============================================================================
|
||||
# GoHorse Jobs Backend - Environment Variables
|
||||
# =============================================================================
|
||||
|
||||
# Database Configuration (preferred: use DATABASE_URL)
|
||||
DATABASE_URL=postgresql://user:password@localhost:5432/gohorsejobs?sslmode=require
|
||||
# Database Configuration (use DATABASE_URL format)
|
||||
DATABASE_URL=postgresql://user:password@localhost:5432/gohorsejobs?sslmode=disable
|
||||
|
||||
# Alternative: Individual params (used if DATABASE_URL not set)
|
||||
# DB_HOST=localhost
|
||||
# DB_PORT=5432
|
||||
# DB_USER=postgres
|
||||
# DB_PASSWORD=yourpassword
|
||||
# DB_NAME=gohorsejobs
|
||||
# DB_SSLMODE=require
|
||||
|
||||
# S3/Object Storage Configuration (Civo S3-compatible)
|
||||
# =============================================================================
|
||||
# S3/Object Storage (Civo S3-compatible)
|
||||
# =============================================================================
|
||||
AWS_REGION=nyc1
|
||||
AWS_ACCESS_KEY_ID=your-access-key
|
||||
AWS_SECRET_ACCESS_KEY=your-secret-key
|
||||
AWS_ACCESS_KEY_ID=your-access-key-id
|
||||
AWS_SECRET_ACCESS_KEY=your-secret-access-key
|
||||
AWS_ENDPOINT=https://objectstore.nyc1.civo.com
|
||||
S3_BUCKET=your-bucket-name
|
||||
|
||||
# JWT Secret (CHANGE IN PRODUCTION!)
|
||||
JWT_SECRET=your-secret-key-change-this-in-production-use-strong-random-value
|
||||
# =============================================================================
|
||||
# JWT Authentication
|
||||
# =============================================================================
|
||||
JWT_SECRET=change-this-to-a-strong-secret-at-least-32-characters
|
||||
|
||||
# =============================================================================
|
||||
# Server Configuration
|
||||
PORT=8521
|
||||
# =============================================================================
|
||||
BACKEND_PORT=8521
|
||||
BACKEND_HOST=localhost:8521
|
||||
ENV=development
|
||||
API_HOST=localhost:8521
|
||||
|
||||
# CORS Origins (comma-separated)
|
||||
CORS_ORIGINS=http://localhost:3000,http://localhost:8963
|
||||
|
|
@ -36,7 +36,7 @@ CLOUDFLARE_API_TOKEN=your-cloudflare-api-token
|
|||
CLOUDFLARE_ZONE_ID=your-zone-id
|
||||
|
||||
# =============================================================================
|
||||
# cPanel API (for email management)
|
||||
# cPanel API (for email management)
|
||||
# =============================================================================
|
||||
CPANEL_HOST=https://cpanel.yourdomain.com:2083
|
||||
CPANEL_USERNAME=your-cpanel-username
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ func main() {
|
|||
database.RunMigrations()
|
||||
|
||||
// Configure Swagger Host dynamically
|
||||
apiHost := os.Getenv("API_HOST")
|
||||
apiHost := os.Getenv("BACKEND_HOST")
|
||||
if apiHost == "" {
|
||||
apiHost = "localhost:8521"
|
||||
}
|
||||
|
|
@ -57,7 +57,7 @@ func main() {
|
|||
|
||||
handler := router.NewRouter()
|
||||
|
||||
port := os.Getenv("PORT")
|
||||
port := os.Getenv("BACKEND_PORT")
|
||||
if port == "" {
|
||||
port = "8521"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue