From 59c9f2e17e3a701ecf641a39ea3b3ecaacf5079b Mon Sep 17 00:00:00 2001 From: Varakh Date: Thu, 21 Dec 2023 19:31:46 +0100 Subject: [PATCH 1/2] Fix documentation regarding DB_SQLITE_FILE and prometheus reverse proxy if scraped publicly #noissue --- _doc/DEPLOYMENT.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/_doc/DEPLOYMENT.md b/_doc/DEPLOYMENT.md index 327f6ec..c367d85 100644 --- a/_doc/DEPLOYMENT.md +++ b/_doc/DEPLOYMENT.md @@ -111,7 +111,7 @@ services: image: git.myservermanager.com/varakh/upda:latest environment: - TZ=Europe/Berlin - - DB_FILE=/data/upda.db + - DB_SQLITE_FILE=/data/upda.db - ADMIN_USER=admin - ADMIN_PASSWORD=changeit restart: unless-stopped @@ -158,5 +158,13 @@ server { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } + # metrics + location ~* ^/metrics { + proxy_pass http://localhost:8080; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } } ``` -- 2.45.2 From 673a74c51cb4ccecfec6ff6b294db32ff73fb5a7 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 21 Dec 2023 21:01:24 +0000 Subject: [PATCH 2/2] Update gocron to v2 --- go.mod | 4 +++- go.sum | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 775643b..a462e6d 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,10 @@ require ( github.com/gin-gonic/gin v1.9.1 github.com/go-co-op/gocron v1.37.0 github.com/go-co-op/gocron-redis-lock v1.3.0 + github.com/go-co-op/gocron-redis-lock/v2 v2.0.0 + github.com/go-co-op/gocron/v2 v2.1.1 github.com/go-playground/validator/v10 v10.16.0 + github.com/go-resty/resty/v2 v2.10.0 github.com/google/uuid v1.5.0 github.com/redis/go-redis/v9 v9.3.1 github.com/stretchr/testify v1.8.4 @@ -36,7 +39,6 @@ require ( github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-redsync/redsync/v4 v4.10.0 // indirect - github.com/go-resty/resty/v2 v2.10.0 // indirect github.com/goccy/go-json v0.10.2 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect diff --git a/go.sum b/go.sum index 732715f..3151387 100644 --- a/go.sum +++ b/go.sum @@ -69,6 +69,8 @@ github.com/go-co-op/gocron-redis-lock v1.2.0 h1:c5aGtxGxqWfln50Fdx9WpwYwtX7bK8i+ github.com/go-co-op/gocron-redis-lock v1.2.0/go.mod h1:En1WRsLSXsWiRul1GNyKiqniGe6UnrcEs9bOzDBya04= github.com/go-co-op/gocron-redis-lock v1.3.0 h1:PKwtuc/BhrDll/DxJfnXoW/+D1VXubd47xcGaB9pDuM= github.com/go-co-op/gocron-redis-lock v1.3.0/go.mod h1:9+H7ZfqVtJfx94uEAELwH+uHkn1UpM6lRM99wOBTGtg= +github.com/go-co-op/gocron-redis-lock/v2 v2.0.0/go.mod h1:0LXNORuX2O6f20PbnXS7yXXrk4IhI71cVNX1j5ADydo= +github.com/go-co-op/gocron/v2 v2.1.1/go.mod h1:0MfNAXEchzeSH1vtkZrTAcSMWqyL435kL6CA4b0bjrg= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= -- 2.45.2