this should do it

This commit is contained in:
2025-10-14 22:35:11 +03:00
parent 54daf46d06
commit 356df3fc46
4 changed files with 103 additions and 6 deletions

View File

@@ -11,6 +11,9 @@ type Config struct {
DeployRoot string
ReleaseRoot string
DBPath string
DBJournalMode string
DBSynchronous string
DBBusyTimeout int
MaxUploadSize int64
LogLevel string
ReleasesToKeep int
@@ -25,6 +28,9 @@ func LoadConfig() (*Config, error) {
DeployRoot: getEnvOrDefault("DEPLOY_ROOT", "/var/www/docs"),
ReleaseRoot: getEnvOrDefault("RELEASE_ROOT", "/var/www/deploys"),
DBPath: getEnvOrDefault("DB_PATH", "/data/deployer.db"),
DBJournalMode: getEnvOrDefault("DB_JOURNAL_MODE", "DELETE"),
DBSynchronous: getEnvOrDefault("DB_SYNCHRONOUS", "FULL"),
DBBusyTimeout: getEnvAsInt("DB_BUSY_TIMEOUT", 10000),
MaxUploadSize: getEnvAsInt64("MAX_UPLOAD_SIZE", 104857600),
LogLevel: getEnvOrDefault("LOG_LEVEL", "info"),
ReleasesToKeep: getEnvAsInt("RELEASES_TO_KEEP", 5),