From 6bf7f25fe54c2926c2db87595e67c0ac2edf4212 Mon Sep 17 00:00:00 2001 From: Marcello Date: Tue, 24 Sep 2024 18:48:35 -0400 Subject: [PATCH] feature: renewals for certbot --- deploy.sh | 1 + internal/api/routes.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/deploy.sh b/deploy.sh index 9e57fae..fc81159 100755 --- a/deploy.sh +++ b/deploy.sh @@ -33,6 +33,7 @@ docker container prune -f docker run -d \ -p 8082:8080 \ -v $(pwd)/fun_banking.db:/app/fun_banking.db \ + -v /var/www/html:/var/www/html \ -e DATABASE_URL=/app/fun_banking.db \ -e GIN_MODE=release \ --name fun_banking_container fun_banking diff --git a/internal/api/routes.go b/internal/api/routes.go index f8d20f0..0b6bed6 100644 --- a/internal/api/routes.go +++ b/internal/api/routes.go @@ -2,6 +2,7 @@ package api import ( "html/template" + "net/http" "os" "time" @@ -38,6 +39,7 @@ func Start() { router.LoadHTMLGlob("templates/**/*") // Load Static Files router.Static("/static", "public/") + router.StaticFS("/.well-known/acme-challenge", http.Dir("/var/www/html/.well-known/acme-challenge")) // Middleware router.Use(middleware.Audit(), middleware.CustomerAudit(), middleware.PreferencesAudit()) // Setup Routes