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 Configuration (use DATABASE_URL format)
|
||||||
DATABASE_URL=postgresql://user:password@localhost:5432/gohorsejobs?sslmode=require
|
DATABASE_URL=postgresql://user:password@localhost:5432/gohorsejobs?sslmode=disable
|
||||||
|
|
||||||
# Alternative: Individual params (used if DATABASE_URL not set)
|
# =============================================================================
|
||||||
# DB_HOST=localhost
|
# S3/Object Storage (Civo S3-compatible)
|
||||||
# DB_PORT=5432
|
# =============================================================================
|
||||||
# DB_USER=postgres
|
|
||||||
# DB_PASSWORD=yourpassword
|
|
||||||
# DB_NAME=gohorsejobs
|
|
||||||
# DB_SSLMODE=require
|
|
||||||
|
|
||||||
# S3/Object Storage Configuration (Civo S3-compatible)
|
|
||||||
AWS_REGION=nyc1
|
AWS_REGION=nyc1
|
||||||
AWS_ACCESS_KEY_ID=your-access-key
|
AWS_ACCESS_KEY_ID=your-access-key-id
|
||||||
AWS_SECRET_ACCESS_KEY=your-secret-key
|
AWS_SECRET_ACCESS_KEY=your-secret-access-key
|
||||||
AWS_ENDPOINT=https://objectstore.nyc1.civo.com
|
AWS_ENDPOINT=https://objectstore.nyc1.civo.com
|
||||||
S3_BUCKET=your-bucket-name
|
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
|
# Server Configuration
|
||||||
PORT=8521
|
# =============================================================================
|
||||||
|
BACKEND_PORT=8521
|
||||||
|
BACKEND_HOST=localhost:8521
|
||||||
ENV=development
|
ENV=development
|
||||||
API_HOST=localhost:8521
|
|
||||||
|
|
||||||
# CORS Origins (comma-separated)
|
# CORS Origins (comma-separated)
|
||||||
CORS_ORIGINS=http://localhost:3000,http://localhost:8963
|
CORS_ORIGINS=http://localhost:3000,http://localhost:8963
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ func main() {
|
||||||
database.RunMigrations()
|
database.RunMigrations()
|
||||||
|
|
||||||
// Configure Swagger Host dynamically
|
// Configure Swagger Host dynamically
|
||||||
apiHost := os.Getenv("API_HOST")
|
apiHost := os.Getenv("BACKEND_HOST")
|
||||||
if apiHost == "" {
|
if apiHost == "" {
|
||||||
apiHost = "localhost:8521"
|
apiHost = "localhost:8521"
|
||||||
}
|
}
|
||||||
|
|
@ -57,7 +57,7 @@ func main() {
|
||||||
|
|
||||||
handler := router.NewRouter()
|
handler := router.NewRouter()
|
||||||
|
|
||||||
port := os.Getenv("PORT")
|
port := os.Getenv("BACKEND_PORT")
|
||||||
if port == "" {
|
if port == "" {
|
||||||
port = "8521"
|
port = "8521"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue