mirror of
https://github.com/Dvorinka/MyClubServer.git
synced 2026-06-03 18:22:57 +00:00
dev day #99
This commit is contained in:
+26
-20
@@ -14,10 +14,10 @@ import (
|
||||
// Config holds all configuration for the application
|
||||
type Config struct {
|
||||
// App settings
|
||||
AppEnv string
|
||||
Port string
|
||||
Debug bool
|
||||
Premium bool
|
||||
AppEnv string
|
||||
Port string
|
||||
Debug bool
|
||||
Premium bool
|
||||
|
||||
// Database settings
|
||||
DatabaseURL string
|
||||
@@ -68,15 +68,15 @@ type Config struct {
|
||||
AllowedOrigins []string
|
||||
|
||||
// External services
|
||||
ScraperBaseURL string
|
||||
FrontendBaseURL string
|
||||
ScraperBaseURL string
|
||||
FrontendBaseURL string
|
||||
PublicAPIBaseURL string
|
||||
|
||||
|
||||
// Umami Analytics
|
||||
UmamiURL string
|
||||
UmamiUsername string
|
||||
UmamiPassword string
|
||||
UmamiWebsiteID string
|
||||
UmamiURL string
|
||||
UmamiUsername string
|
||||
UmamiPassword string
|
||||
UmamiWebsiteID string
|
||||
|
||||
ErrorIngestURL string
|
||||
ErrorIngestToken string
|
||||
@@ -85,6 +85,9 @@ type Config struct {
|
||||
ClamAVEnabled bool
|
||||
ClamAVHost string
|
||||
ClamAVPort int
|
||||
|
||||
// Feature flags
|
||||
RembgEnabled bool
|
||||
}
|
||||
|
||||
var AppConfig *Config
|
||||
@@ -96,10 +99,10 @@ func LoadConfig() {
|
||||
|
||||
AppConfig = &Config{
|
||||
// App settings
|
||||
AppEnv: getEnv("APP_ENV", "development"),
|
||||
Port: getEnv("PORT", "8080"),
|
||||
Debug: getEnvAsBool("DEBUG", true),
|
||||
Premium: getEnvAsBool("PREMIUM", false),
|
||||
AppEnv: getEnv("APP_ENV", "development"),
|
||||
Port: getEnv("PORT", "8080"),
|
||||
Debug: getEnvAsBool("DEBUG", true),
|
||||
Premium: getEnvAsBool("PREMIUM", false),
|
||||
|
||||
// Database settings
|
||||
DatabaseURL: getEnv("DATABASE_URL", "postgres://postgres:postgres@localhost:5432/fotbal_club?sslmode=disable"),
|
||||
@@ -131,11 +134,11 @@ func LoadConfig() {
|
||||
"image/svg+xml",
|
||||
// Documents
|
||||
"application/pdf",
|
||||
"application/msword", // .doc
|
||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document", // .docx
|
||||
"application/vnd.ms-excel", // .xls
|
||||
"application/msword", // .doc
|
||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document", // .docx
|
||||
"application/vnd.ms-excel", // .xls
|
||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", // .xlsx
|
||||
"application/vnd.ms-powerpoint", // .ppt
|
||||
"application/vnd.ms-powerpoint", // .ppt
|
||||
"application/vnd.openxmlformats-officedocument.presentationml.presentation", // .pptx
|
||||
// Text
|
||||
"text/plain",
|
||||
@@ -178,7 +181,7 @@ func LoadConfig() {
|
||||
ScraperBaseURL: getEnv("FACR_SCRAPER_BASE_URL", "http://localhost:8081"),
|
||||
FrontendBaseURL: getEnv("FRONTEND_BASE_URL", "http://localhost:3000"),
|
||||
PublicAPIBaseURL: getEnv("PUBLIC_API_BASE_URL", "http://localhost:8080/api/v1"),
|
||||
|
||||
|
||||
// Umami Analytics
|
||||
UmamiURL: getEnv("UMAMI_URL", ""),
|
||||
UmamiUsername: getEnv("UMAMI_USERNAME", ""),
|
||||
@@ -192,6 +195,9 @@ func LoadConfig() {
|
||||
ClamAVEnabled: getEnvAsBool("CLAMAV_ENABLED", false),
|
||||
ClamAVHost: getEnv("CLAMAV_HOST", "127.0.0.1"),
|
||||
ClamAVPort: getEnvAsInt("CLAMAV_PORT", 3310),
|
||||
|
||||
// Feature flags
|
||||
RembgEnabled: getEnvAsBool("REMBG_ENABLED", true),
|
||||
}
|
||||
|
||||
// Override allowed origins if specified in environment (comma-separated)
|
||||
|
||||
Reference in New Issue
Block a user