Compare commits

..

2 Commits

Author SHA1 Message Date
Tomas Dvorak 9d63fa7620 chore(config): update environment variables
CI / Frontend (push) Successful in 10m8s
CI / Go - apps/auth-service (push) Failing after 4s
CI / Go - apps/backend (push) Successful in 10m17s
CI / Docker publish - auth-service (push) Has been skipped
CI / Docker publish - backend (push) Has been skipped
- rename BOOKRA_STRIPE_SECRET_KEY to BOOKRA_STRIPE_API_KEY
- split database connection into BOOKRA_DATABASE_URL (pooled) and BOOKRA_DATABASE_DIRECT_URL (direct)
- add BOOKRA_JOB_RUNNER_KEY for cron endpoint protection
- add BOOKRA_EMAIL_FROM for SMTP configuration
2026-05-11 18:36:53 +02:00
Tomas Dvorak 3b6f46828b refactor(config): remove paddle configuration validation 2026-05-11 18:16:46 +02:00
2 changed files with 9 additions and 15 deletions
-13
View File
@@ -104,19 +104,6 @@ func (cfg Config) validateRuntimeRequirements() error {
if cfg.SMTPHost == "" {
missing = append(missing, "BOOKRA_SMTP_HOST")
}
if cfg.PaddleAPIKey == "" {
missing = append(missing, "BOOKRA_PADDLE_API_KEY")
}
if cfg.PaddleWebhookKey == "" {
missing = append(missing, "BOOKRA_PADDLE_WEBHOOK_SECRET")
}
for _, planCode := range []string{"starter", "pro", "business"} {
if cfg.PaddlePriceMatrix[planCode]["czk"] == "" || cfg.PaddlePriceMatrix[planCode]["usd"] == "" {
envPlan := strings.ToUpper(strings.ReplaceAll(planCode, "-", "_"))
missing = append(missing, "BOOKRA_PADDLE_"+envPlan+"_CZK_PRICE_ID")
missing = append(missing, "BOOKRA_PADDLE_"+envPlan+"_USD_PRICE_ID")
}
}
if len(missing) > 0 {
return fmt.Errorf("%s required when BOOKRA_APP_ENV=%s", strings.Join(uniqueStrings(missing), ", "), cfg.Environment)
}
+9 -2
View File
@@ -8,14 +8,20 @@ BOOKRA_API_URL=https://api.bookra.eu
BOOKRA_FRONTEND_URL=https://bookra.eu
# Neon Database
BOOKRA_DATABASE_DIRECT_URL=postgresql://neondb_owner:npg_64KyAGZtIsSk@ep-mute-water-alem1v8u-pooler.c-3.eu-central-1.aws.neon.tech/neondb?sslmode=require&channel_binding=require
# Pooled connection (used by the app)
BOOKRA_DATABASE_URL=postgresql://neondb_owner:npg_64KyAGZtIsSk@ep-mute-water-alem1v8u-pooler.c-3.eu-central-1.aws.neon.tech/neondb?sslmode=require&channel_binding=require
# Direct connection (used by migrations)
BOOKRA_DATABASE_DIRECT_URL=postgresql://neondb_owner:npg_64KyAGZtIsSk@ep-mute-water-alem1v8u.c-3.eu-central-1.aws.neon.tech/neondb?sslmode=require&channel_binding=require
BOOKRA_NEON_AUTH_URL=https://ep-mute-water-alem1v8u.neonauth.c-3.eu-central-1.aws.neon.tech/neondb/auth
# Auth JWT Secret
BOOKRA_AUTH_JWT_SECRET=RECyrjswpfmw/D5UK4gsg38unglVkgc+9YTq0cKke7w=
# Job Runner Key (protects internal cron endpoints)
BOOKRA_JOB_RUNNER_KEY=870d6bd91cfb87dff0b736849001c4521404bb385a18f7e26e84743593b746e7
# Stripe (Secret key only - publishable key not needed on backend)
BOOKRA_STRIPE_SECRET_KEY=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
BOOKRA_STRIPE_API_KEY=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
BOOKRA_STRIPE_WEBHOOK_SECRET=whsec_Rq2w77ersHwjiQKEOqA17v81BacP5Wev
# Stripe Price IDs (Monthly)
@@ -51,3 +57,4 @@ BOOKRA_SMTP_HOST=smtp.purelymail.com
BOOKRA_SMTP_PORT=465
BOOKRA_SMTP_USERNAME=noreply@bookra.eu
BOOKRA_SMTP_PASSWORD=8deCHFCuVQAxUg@YxP
BOOKRA_EMAIL_FROM=noreply@bookra.eu