Skip to content

Open-source gym & body-weight tracker, now in the App Store (iPhone + Apple Watch) and as an Android APK. Plan routines, log workouts, see which muscles are trained, import from Strong/Hevy/FitNotes. Self-host it or use it on the phone alone.

web: nginx loest den api-Container pro Request auf (502 nach api-Recreate, #16); renovate.json ohne _comment/_managers (#37)

Duarte Santosc78bc6763f6e
diff --git a/renovate.json b/renovate.json
index 2ca8c02ed..7864072c6 100644
--- a/renovate.json
+++ b/renovate.json
@@ -1,90 +1,137 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
- "extends": ["config:recommended", ":semanticCommitsDisabled"],
-
- "_comment": [
+ "description": [
"Dependency updates, deliberately quiet — the GitLab counterpart of .github/dependabot.yml,",
"with the same policy behind it. openGym is dependency-light on purpose: the frontend is",
"React + Router + Zustand, api/ has two runtime dependencies. A default setup would still",
"open an MR per package per week, which on a solo project means the MRs stop being read —",
"the opposite of what this is for. So: monthly, everything in an ecosystem grouped into one",
"MR, and a low cap on open MRs.",
- "Run by the `renovate` job in .gitlab-ci.yml, which fires only on *scheduled* pipelines."
+ "Run by the `renovate` job in .gitlab-ci.yml, which fires only on *scheduled* pipelines.",
+ "gradle (frontend/android) and cocoapods (frontend/ios) are deliberately NOT managed:",
+ "Capacitor generates those shells and pins the native versions to the @capacitor/* npm",
+ "packages. Bumping them independently desyncs the two and breaks the mobile build; they",
+ "follow the npm update instead."
+ ],
+ "extends": [
+ "config:recommended",
+ ":semanticCommitsDisabled"
],
-
"timezone": "Europe/Zurich",
- "schedule": ["* 0-6 1 * *"],
+ "schedule": [
+ "* 0-6 1 * *"
+ ],
"prConcurrentLimit": 5,
"prHourlyLimit": 0,
- "labels": ["dependencies"],
+ "labels": [
+ "dependencies"
+ ],
"rangeStrategy": "bump",
"dependencyDashboard": true,
-
- "_managers": [
- "gradle (frontend/android) and cocoapods (frontend/ios) are deliberately NOT managed:",
- "Capacitor generates those shells and pins the native versions to the @capacitor/* npm",
- "packages. Bumping them independently desyncs the two and breaks the mobile build; they",
- "follow the npm update instead."
+ "enabledManagers": [
+ "npm",
+ "dockerfile",
+ "gitlabci"
],
- "enabledManagers": ["npm", "dockerfile", "gitlabci"],
-
"packageRules": [
{
"description": "Frontend routine bumps arrive as one MR. Runtime and build tooling move together anyway (a Vite bump usually wants its plugin bumped), and splitting them doubles the review without splitting the risk.",
- "matchManagers": ["npm"],
- "matchFileNames": ["frontend/package.json"],
- "matchUpdateTypes": ["minor", "patch"],
+ "matchManagers": [
+ "npm"
+ ],
+ "matchFileNames": [
+ "frontend/package.json"
+ ],
+ "matchUpdateTypes": [
+ "minor",
+ "patch"
+ ],
"groupName": "frontend"
},
{
"description": "Frontend majors get their own MR. The first grouped run on GitHub bundled a Capacitor 7 → 8 migration in with six siblings, where it read as housekeeping — and CI would have gone green on it, because the test job builds the web app and never touches the mobile flavour. A major that lands alone is at least obviously a decision.",
- "matchManagers": ["npm"],
- "matchFileNames": ["frontend/package.json"],
- "matchUpdateTypes": ["major"],
+ "matchManagers": [
+ "npm"
+ ],
+ "matchFileNames": [
+ "frontend/package.json"
+ ],
+ "matchUpdateTypes": [
+ "major"
+ ],
"groupName": "frontend-major"
},
{
"description": "Capacitor 8 needs Node >= 22 and frontend/android + frontend/ios are committed, so a major also means migrating the native projects — Gradle/AGP, the Podfile. That is a deliberate piece of work, not a dependency bump. Drop this rule when you want to do it.",
- "matchPackageNames": ["@capacitor/**"],
- "matchUpdateTypes": ["major"],
+ "matchPackageNames": [
+ "@capacitor/**"
+ ],
+ "matchUpdateTypes": [
+ "major"
+ ],
"enabled": false
},
{
"description": "Backend, api/package.json (@simplewebauthn/server, web-push).",
- "matchManagers": ["npm"],
- "matchFileNames": ["api/package.json"],
- "matchUpdateTypes": ["minor", "patch"],
+ "matchManagers": [
+ "npm"
+ ],
+ "matchFileNames": [
+ "api/package.json"
+ ],
+ "matchUpdateTypes": [
+ "minor",
+ "patch"
+ ],
"groupName": "api"
},
{
"description": "Two dependencies, but one of them verifies passkeys — a major there is worth reading on its own rather than alongside anything else.",
- "matchManagers": ["npm"],
- "matchFileNames": ["api/package.json"],
- "matchUpdateTypes": ["major"],
+ "matchManagers": [
+ "npm"
+ ],
+ "matchFileNames": [
+ "api/package.json"
+ ],
+ "matchUpdateTypes": [
+ "major"
+ ],
"groupName": "api-major"
},
{
"description": "Base images in api/Dockerfile and web/Dockerfile.",
- "matchManagers": ["dockerfile"],
+ "matchManagers": [
+ "dockerfile"
+ ],
"groupName": "base images"
},
{
"description": "Odd-numbered Node majors are 'Current', never LTS — they stop getting fixes in about six months. Dependabot's first run offered 22 → 25, which for something other people self-host is a stability downgrade for nothing. Even majors (22 → 24 → 26) are still proposed, which is the move actually worth reviewing.",
- "matchDatasources": ["docker"],
- "matchPackageNames": ["node"],
+ "matchDatasources": [
+ "docker"
+ ],
+ "matchPackageNames": [
+ "node"
+ ],
"allowedVersions": "/^(\\d*[02468])\\./"
},
{
"description": "The images the pipeline itself runs on. Same reasoning as the GitHub-Actions rule this replaces: these jobs publish the container images and build the signed APK, so the blast radius is real — but they move in lockstep and none is worth an MR of its own.",
- "matchManagers": ["gitlabci"],
+ "matchManagers": [
+ "gitlabci"
+ ],
"groupName": "ci images"
}
],
-
"vulnerabilityAlerts": {
"description": "Security fixes ignore the monthly schedule and the group — they land immediately, on their own.",
- "schedule": ["at any time"],
- "labels": ["dependencies", "security"],
+ "schedule": [
+ "at any time"
+ ],
+ "labels": [
+ "dependencies",
+ "security"
+ ],
"prPriority": 10
}
}
diff --git a/web/nginx.conf.template b/web/nginx.conf.template
index b1c6bc4b9..f92ce83f9 100644
--- a/web/nginx.conf.template
+++ b/web/nginx.conf.template
@@ -20,7 +20,13 @@ server {
# as /api/anything.json would be matched by the \.(js|css|json|html)$ block instead and be
# looked for on disk rather than proxied.
location ^~ /api/ {
- proxy_pass http://${BACKEND}:${PORT};
+ # Resolved per request through Docker's DNS, not once at start-up: nginx otherwise pins
+ # the api container's IP when it boots, and a recreated api (new IP) means 502 on every
+ # /api call until web is restarted too (issue #16). The variable is what makes nginx
+ # re-resolve; lowercase so the entrypoint's envsubst leaves it alone.
+ resolver 127.0.0.11 valid=10s ipv6=off;
+ set $api_upstream http://${BACKEND}:${PORT};
+ proxy_pass $api_upstream;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;