From f94fa7c0e324d25349206db7353bbf722e180ea4 Mon Sep 17 00:00:00 2001 From: Duarte Santos Date: Sat, 22 Aug 2026 13:54:26 +0200 Subject: [PATCH] Umzug nach gitea.com: Images, Klon-URL, Anlaufstellen und CI umgestellt Das GitHub-Repo ist mit dem gesperrten Account weg, mit ihm die GHCR-Images, die Pages-Demo und die Discussions. Alles, was jemand zum Selbsthosten anklickt, zeigte aber weiter dorthin. - docker-compose zieht jetzt gitea.com/duartesantos/opengym-{api,web}; die Dockerfile-Labels (source/url/documentation) ebenso - README, SECURITY, CONTRIBUTING und docs/SELF_HOSTING zeigen auf gitea.com. Discussions gibt es dort nicht: Fragen und Ideen laufen als gelabelte Issues, Security-Meldungen ueber eine Issue-Anfrage nach einem privaten Kanal statt ueber GitHubs Advisories - Badges auf die Gitea-Shields umgestellt, die tote Pages-Demo aus dem Kopf genommen (die APK bleibt der Weg zum Ausprobieren) - .gitea/workflows: Tests und Docker-Publish, weiter mit Release- statt Tag-Trigger. Kein type=gha-Cache, den gibt es auf den Gitea-Runnern nicht; der Push braucht ein Repo-Secret PACKAGES_TOKEN mit write:package - .gitea/ISSUE_TEMPLATE mit denselben Formularen wie auf GitHub - .github/* bleibt unangetastet, falls der Account zurueckkommt Die alten Issue-/PR-Nummern im CHANGELOG bleiben als reiner Text stehen - sie zeigen auf ein totes Repo und passen nicht auf die Nummerierung hier. --- .gitea/ISSUE_TEMPLATE/bug_report.yml | 60 ++++++++++++++++ .gitea/ISSUE_TEMPLATE/config.yml | 14 ++++ .gitea/ISSUE_TEMPLATE/feature_request.yml | 29 ++++++++ .gitea/workflows/docker-publish.yml | 86 +++++++++++++++++++++++ .gitea/workflows/test.yml | 38 ++++++++++ CONTRIBUTING.md | 11 +-- README.md | 39 +++++----- SECURITY.md | 17 +++-- api/Dockerfile | 8 +-- docker-compose.yml | 4 +- docs/SELF_HOSTING.md | 4 +- frontend/src/lib/demo.js | 2 +- frontend/src/views/Settings.jsx | 2 +- web/Dockerfile | 8 +-- 14 files changed, 276 insertions(+), 46 deletions(-) create mode 100644 .gitea/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .gitea/ISSUE_TEMPLATE/config.yml create mode 100644 .gitea/ISSUE_TEMPLATE/feature_request.yml create mode 100644 .gitea/workflows/docker-publish.yml create mode 100644 .gitea/workflows/test.yml diff --git a/.gitea/ISSUE_TEMPLATE/bug_report.yml b/.gitea/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..dfc821e --- /dev/null +++ b/.gitea/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,60 @@ +name: Bug report +description: Something in openGym is broken or not working as expected +labels: ["bug"] +body: + - type: textarea + id: what-happened + attributes: + label: What did you do? + description: Steps to reproduce, as precisely as you can. + placeholder: | + 1. Go to '...' + 2. Click on '...' + 3. See error + validations: + required: true + + - type: textarea + id: expected + attributes: + label: What did you expect to happen? + validations: + required: true + + - type: textarea + id: actual + attributes: + label: What happened instead? + description: Include error messages, console output, or screenshots if you have them. + validations: + required: true + + - type: dropdown + id: setup + attributes: + label: How are you running openGym? + options: + - Self-hosted (docker compose) + - Frontend dev server (npm run dev) + - Other / not sure + validations: + required: true + + - type: input + id: environment + attributes: + label: Browser & OS + placeholder: e.g. Safari 17 on iOS 18, Chrome 126 on Android + validations: + required: true + + - type: checkboxes + id: passkey + attributes: + label: Is this about login / passkeys? + description: > + Most login issues are an `RP_ID`/`ORIGIN` mismatch — check your `.env` against the + domain you're accessing openGym from before reporting. See the + [self-hosting guide](../../docs/SELF_HOSTING.md). + options: + - label: Yes, this is a login/passkey issue and I've already checked RP_ID/ORIGIN diff --git a/.gitea/ISSUE_TEMPLATE/config.yml b/.gitea/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..ff525f9 --- /dev/null +++ b/.gitea/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,14 @@ +# gitea.com has no Discussions, so questions and ideas are issues here — labelled, so they +# are not mistaken for agreed-on work. Blank issues stay off: the forms ask for the two +# things that otherwise cost a round-trip every time (how it is running, and RP_ID/ORIGIN). +blank_issues_enabled: false +contact_links: + - name: Self-hosting guide + url: https://gitea.com/DuarteSantos/openGym/src/branch/main/docs/SELF_HOSTING.md + about: Passkey login failing, reverse proxies, HTTPS, Docker — most login trouble is an RP_ID/ORIGIN mismatch and is answered here. + - name: Contributing guide + url: https://gitea.com/DuarteSantos/openGym/src/branch/main/CONTRIBUTING.md + about: Project layout, dev setup and guidelines before you open a PR. + - name: Changelog + url: https://gitea.com/DuarteSantos/openGym/src/branch/main/CHANGELOG.md + about: What changed in each release, newest first. diff --git a/.gitea/ISSUE_TEMPLATE/feature_request.yml b/.gitea/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..8813faa --- /dev/null +++ b/.gitea/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,29 @@ +name: Feature request +description: Suggest an idea or improvement for openGym +labels: ["enhancement"] +body: + - type: textarea + id: problem + attributes: + label: What problem does this solve? + description: What are you trying to do that openGym doesn't support today? + validations: + required: true + + - type: textarea + id: proposal + attributes: + label: Proposed approach + description: How would you like it to work? Rough ideas are fine. + validations: + required: true + + - type: checkboxes + id: deps + attributes: + label: Dependencies + description: > + openGym is intentionally dependency-light — new packages (front or back) are a hard + sell. See [CONTRIBUTING.md](../../CONTRIBUTING.md). + options: + - label: This doesn't require adding a new dependency diff --git a/.gitea/workflows/docker-publish.yml b/.gitea/workflows/docker-publish.yml new file mode 100644 index 0000000..d344da5 --- /dev/null +++ b/.gitea/workflows/docker-publish.yml @@ -0,0 +1,86 @@ +# Publishes the two images to the gitea.com container registry, replacing GHCR. +# +# Images land at gitea.com/duartesantos/opengym-{api,web} and are what +# `docker compose pull` fetches. +# +# As on GitHub, a *published release* is the trigger, never a bare tag push: the +# versioning rule consolidates unreleased tags, and a deleted tag does not delete +# the image tags it already pushed — dependency bots then read the orphan as a +# newer series (that was issue #87 on the old repo). +# +# Needs one repository secret: PACKAGES_TOKEN — a gitea.com token with +# write:package scope (Settings → Applications → Generate New Token). The built-in +# token cannot write packages. +name: Publish Docker images + +on: + push: + branches: [main] + release: + types: [published] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + include: + - image: api + context: ./api + file: ./api/Dockerfile + - image: web + context: . + file: ./web/Dockerfile + steps: + - uses: actions/checkout@v4 + + - name: Lowercase owner (registry names must be lowercase) + id: repo + run: echo "owner=$(echo '${{ github.repository_owner }}' | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT" + + - name: Set version metadata + id: version_meta + run: | + # On a release the ref is refs/tags/vX.Y.Z; on a main push it is a branch ref, + # which would otherwise label the image "refs/heads/main". + case "$GITHUB_REF" in + refs/tags/*) VERSION="${GITHUB_REF#refs/tags/}" ;; + *) VERSION="main-${GITHUB_SHA::7}" ;; + esac + echo "VERSION=$VERSION" >> $GITHUB_OUTPUT + echo "VCS_REF=${GITHUB_SHA}" >> $GITHUB_OUTPUT + echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT + + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 + + - uses: docker/login-action@v3 + with: + registry: gitea.com + username: ${{ github.repository_owner }} + password: ${{ secrets.PACKAGES_TOKEN }} + + - uses: docker/metadata-action@v5 + id: meta + with: + images: gitea.com/${{ steps.repo.outputs.owner }}/opengym-${{ matrix.image }} + tags: | + type=raw,value=latest,enable={{is_default_branch}} + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + + # No cache-from/to: the GHCR copy used type=gha, which is a GitHub-hosted + # service and is not there on gitea.com's runners. + - uses: docker/build-push-action@v6 + with: + context: ${{ matrix.context }} + file: ${{ matrix.file }} + platforms: linux/amd64,linux/arm64 + build-args: | + VERSION=${{ steps.version_meta.outputs.VERSION }} + VCS_REF=${{ steps.version_meta.outputs.VCS_REF }} + BUILD_DATE=${{ steps.version_meta.outputs.BUILD_DATE }} + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml new file mode 100644 index 0000000..f6da78e --- /dev/null +++ b/.gitea/workflows/test.yml @@ -0,0 +1,38 @@ +# Same suite as .github/workflows/test.yml, run by gitea.com's Actions runners. +# The GitHub copy is kept for the day that account comes back; this one is what +# actually gates contributions today. +name: Tests + +on: + pull_request: + paths: + - 'frontend/**' + - 'mcp/**' + - '.gitea/workflows/test.yml' + push: + branches: [main] + paths: + - 'frontend/**' + - 'mcp/**' + - '.gitea/workflows/test.yml' + workflow_dispatch: + +concurrency: + group: test-${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + # node:22-alpine in web/Dockerfile and api/Dockerfile — CI must match production. + - uses: actions/setup-node@v4 + with: + node-version: 22 + cache: npm + cache-dependency-path: frontend/package-lock.json + - run: npm ci + working-directory: frontend + - run: npm test + working-directory: frontend diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a33bc04..7826a98 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -55,13 +55,14 @@ cd frontend && npm test | You have | Goes to | | --- | --- | -| A question, or self-hosting that won't behave | [Discussions → Q&A](https://github.com/DuarteSantos8/openGym/discussions/categories/q-a) | -| An idea you're not sure about yet | [Discussions → Ideas](https://github.com/DuarteSantos8/openGym/discussions/categories/ideas) | -| A reproducible bug | [Issues](https://github.com/DuarteSantos8/openGym/issues) | +| A question, or self-hosting that won't behave | [An issue labelled `question`](https://gitea.com/DuarteSantos/openGym/issues) | +| An idea you're not sure about yet | [An issue labelled `idea`](https://gitea.com/DuarteSantos/openGym/issues) | +| A reproducible bug | [Issues](https://gitea.com/DuarteSantos/openGym/issues) | | A change you've already built | A pull request | -An answered question in Q&A is worth more than the same answer buried in a closed issue — the -next person searching "passkey login fails behind my reverse proxy" actually finds it. +gitea.com has no Discussions, so questions and ideas are issues too — just labelled, so nobody +mistakes a question for agreed-on work. An answered question is worth more than the same answer +in a chat log: the next person searching "passkey login fails behind my reverse proxy" finds it. ## Reporting bugs diff --git a/README.md b/README.md index fd12e3e..a060fee 100644 --- a/README.md +++ b/README.md @@ -19,9 +19,9 @@ No account on someone else's server, no subscription, no ads. Just `docker compo ![Docker](https://img.shields.io/badge/Docker-compose-2496ED?style=flat-square&logo=docker&logoColor=white) ![No tracking](https://img.shields.io/badge/telemetry-none-f472b6?style=flat-square)
-![GitHub last commit](https://img.shields.io/github/last-commit/DuarteSantos8/openGym?style=flat-square) -[![GitHub stars](https://img.shields.io/github/stars/DuarteSantos8/openGym?style=flat-square)](https://github.com/DuarteSantos8/openGym/stargazers) -[![GitHub issues](https://img.shields.io/github/issues/DuarteSantos8/openGym?style=flat-square)](https://github.com/DuarteSantos8/openGym/issues) +![Last commit](https://img.shields.io/gitea/last-commit/DuarteSantos/openGym?gitea_url=https%3A%2F%2Fgitea.com&style=flat-square) +[![Stars](https://img.shields.io/gitea/stars/DuarteSantos/openGym?gitea_url=https%3A%2F%2Fgitea.com&style=flat-square)](https://gitea.com/DuarteSantos/openGym/stars) +[![Issues](https://img.shields.io/gitea/issues/open/DuarteSantos/openGym?gitea_url=https%3A%2F%2Fgitea.com&style=flat-square)](https://gitea.com/DuarteSantos/openGym/issues) @@ -39,11 +39,11 @@ No account on someone else's server, no subscription, no ads. Just `docker compo
-### [🌐 opengym.duarte-santos.ch](https://opengym.duarte-santos.ch) · [▶ Try the live demo](https://duartesantos8.github.io/openGym/) +### [🌐 opengym.duarte-santos.ch](https://opengym.duarte-santos.ch) · [📦 Source on gitea.com](https://gitea.com/DuarteSantos/openGym) -No signup, nothing to install — it runs entirely in your browser on example data.
-There's no server behind the demo, so passkey sign-in, sync across devices and the -admin dashboard only exist in a self-hosted instance. +Screenshots, docs and the APK download live on the site.
+The browser demo was hosted on GitHub Pages and is offline while that account is +suspended — self-host it (below) or sideload the Android app to try it for real.
@@ -92,7 +92,7 @@ as a home-screen app, passkey sign-in, offline support, sync across your phone a You need [Docker](https://docs.docker.com/get-docker/) with Compose. ```bash -git clone https://github.com/DuarteSantos8/openGym +git clone https://gitea.com/DuarteSantos/openGym cd openGym cp .env.example .env docker compose pull # grab prebuilt images (amd64 + arm64) — skip to build from source instead @@ -101,7 +101,7 @@ docker compose up -d Open **http://localhost:8080**, tap **Create profile**, and you're in. First launch downloads the exercise media (~140 MB) once. Prefer building the images yourself instead of pulling from -`ghcr.io`? Drop the `pull` step and run `docker compose up -d --build` — you don't need Node or +`gitea.com`? Drop the `pull` step and run `docker compose up -d --build` — you don't need Node or a build step locally either way. > Want it reachable from your phone over the internet with passkeys? You'll need an HTTPS @@ -202,15 +202,18 @@ in the Docker build. ## Community -- **[Q&A](https://github.com/DuarteSantos8/openGym/discussions/categories/q-a)** — self-hosting - help, passkey/login trouble, "how do I…". Most login problems turn out to be an `RP_ID`/`ORIGIN` - mismatch. -- **[Ideas](https://github.com/DuarteSantos8/openGym/discussions/categories/ideas)** — features - worth talking through before anyone writes code. -- **[Show and tell](https://github.com/DuarteSantos8/openGym/discussions/categories/show-and-tell)** - — your setup, your plan templates, whatever you built on top. -- **[Issues](https://github.com/DuarteSantos8/openGym/issues)** — bugs, and work that's already - been agreed on. +- **[Issues](https://gitea.com/DuarteSantos/openGym/issues)** — bugs, questions, self-hosting + help and ideas. gitea.com has no Discussions, so it all lives in one tracker: label a question + `question` and an idea `idea`, and it gets treated as one rather than as agreed-on work. +- **Login trouble?** Most of it is an `RP_ID`/`ORIGIN` mismatch — check + [docs/SELF_HOSTING.md](docs/SELF_HOSTING.md) before opening an issue. +- **Pull requests** — [open one on gitea.com](https://gitea.com/DuarteSantos/openGym/pulls); see + [CONTRIBUTING.md](CONTRIBUTING.md). + +> **On the GitHub repo:** `github.com/DuarteSantos8/openGym` is offline because the account was +> suspended. gitea.com is the home of the project until that is resolved — same history, same +> tags, same releases. Old GitHub issue and PR numbers in [CHANGELOG.md](CHANGELOG.md) are kept +> as plain references; they don't map onto gitea's numbering. ## Contributing diff --git a/SECURITY.md b/SECURITY.md index 76290cb..71443b9 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -8,7 +8,7 @@ need — what the app protects you from and what it doesn't. Only the **latest release**. Releases are semver tags (`v1.0.0` → `v1.2.3`, see [CHANGELOG.md](CHANGELOG.md)); there is no LTS or maintenance branch and older tags are never -patched. A fix ships in the next release and in the `latest` images on ghcr.io. +patched. A fix ships in the next release and in the `latest` images on gitea.com. Updating a self-hosted instance: @@ -18,14 +18,13 @@ git pull && docker compose pull && docker compose up -d ## Reporting a vulnerability -Use GitHub's private vulnerability reporting — repo **Security** tab → **Report a vulnerability**: +The project moved to gitea.com, which has no private-advisory feature. So: open an issue on + saying only *"I need a private channel for a +security report"* — no details, no repro, no version — and you'll get an address to send it to +within a couple of days. - - -> Private reporting has to be switched on in the repository settings for that link to work -> (Settings → Advanced Security → Private vulnerability reporting). If it 404s, open a normal -> issue saying only *"I need a private channel for a security report"* — no details, no repro — -> and it will be enabled. +> The GitHub repo and its private vulnerability reporting are gone with the suspended account; +> `github.com/DuarteSantos8/openGym/security/advisories/new` no longer resolves. Please don't put a working exploit in a public issue if it can be used against other people's instances. Everything else (a crash you can only trigger on your own box, a scanner warning) @@ -50,7 +49,7 @@ in the thread; there's no objection, and no request to sit on it indefinitely. change a signed-in user's data. - **Shipped deployment config** — `docker-compose.yml`, `web/nginx.conf`, the two Dockerfiles: a default that exposes something a self-hoster wouldn't expect to be exposed. -- **The published images** `ghcr.io/duartesantos8/opengym-api` and `-web`. +- **The published images** `gitea.com/duartesantos/opengym-api` and `-web`. ## Out of scope diff --git a/api/Dockerfile b/api/Dockerfile index e924c28..c0d4065 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -4,12 +4,12 @@ ARG VERSION=dev ARG VCS_REF=dev ARG BUILD_DATE=unknown -LABEL maintainer="Duarte Santos https://github.com/DuarteSantos8" \ +LABEL maintainer="Duarte Santos https://gitea.com/DuarteSantos" \ org.opencontainers.image.title="opengym-api" \ org.opencontainers.image.description="Backend for Self-hosted gym & body-weight tracker — plan routines, log workouts (supersets & cardio too), track your weight and progress, passkey login. Your data, your server." \ - org.opencontainers.image.source="https://github.com/DuarteSantos8/openGym" \ - org.opencontainers.image.url="https://ghcr.io/duartesantos8/opengym-api" \ - org.opencontainers.image.documentation="https://github.com/DuarteSantos8/openGym#readme" \ + org.opencontainers.image.source="https://gitea.com/DuarteSantos/openGym" \ + org.opencontainers.image.url="https://gitea.com/DuarteSantos/-/packages/container/opengym-api" \ + org.opencontainers.image.documentation="https://gitea.com/DuarteSantos/openGym#readme" \ org.opencontainers.image.licenses="AGPL-3.0-or-later" \ org.opencontainers.image.version=$VERSION \ org.opencontainers.image.revision=$VCS_REF \ diff --git a/docker-compose.yml b/docker-compose.yml index 21c9dae..3da2b2f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -24,7 +24,7 @@ services: # Passkey auth + per-user data (Node, no framework). # image: prebuilt (docker compose pull). build: from source (docker compose up --build). api: - image: ghcr.io/duartesantos8/opengym-api:latest + image: gitea.com/duartesantos/opengym-api:latest build: ./api restart: unless-stopped env_file: .env @@ -39,7 +39,7 @@ services: # Builds the React frontend (multi-stage) and serves it, proxying /api → api # and the exercise media from the shared volume. Single origin for passkeys. web: - image: ghcr.io/duartesantos8/opengym-web:latest + image: gitea.com/duartesantos/opengym-web:latest build: context: . dockerfile: web/Dockerfile diff --git a/docs/SELF_HOSTING.md b/docs/SELF_HOSTING.md index 79afa71..956c208 100644 --- a/docs/SELF_HOSTING.md +++ b/docs/SELF_HOSTING.md @@ -8,10 +8,10 @@ This guide takes you from "just cloned it" to "using it from my phone over the i Requirements: [Docker](https://docs.docker.com/get-docker/) with the Compose plugin. ```bash -git clone https://github.com/DuarteSantos8/openGym +git clone https://gitea.com/DuarteSantos/openGym cd openGym cp .env.example .env -docker compose pull # prebuilt images from ghcr.io (amd64 + arm64) — or skip and build from source +docker compose pull # prebuilt images from gitea.com (amd64 + arm64) — or skip and build from source docker compose up -d ``` diff --git a/frontend/src/lib/demo.js b/frontend/src/lib/demo.js index 05f5ed1..3fe28ce 100644 --- a/frontend/src/lib/demo.js +++ b/frontend/src/lib/demo.js @@ -11,4 +11,4 @@ // lands in a self-hosted bundle. export const DEMO = import.meta.env.VITE_DEMO === '1' export const DEMO_SEEDED = 'gym_demo_seeded_v1' -export const REPO = 'https://github.com/DuarteSantos8/openGym' +export const REPO = 'https://gitea.com/DuarteSantos/openGym' diff --git a/frontend/src/views/Settings.jsx b/frontend/src/views/Settings.jsx index 4b3508c..ed867fe 100644 --- a/frontend/src/views/Settings.jsx +++ b/frontend/src/views/Settings.jsx @@ -196,7 +196,7 @@ export default function Settings() {
openGym · {t('free & open source (AGPL v3)')}
- source code · exercise data: hasaneyldrm/exercises-dataset (CC) + source code · exercise data: hasaneyldrm/exercises-dataset (CC)
} diff --git a/web/Dockerfile b/web/Dockerfile index 1c2adf7..56d4014 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -19,12 +19,12 @@ ARG VERSION=dev ARG VCS_REF=dev ARG BUILD_DATE=unknown -LABEL maintainer="Duarte Santos https://github.com/DuarteSantos8" \ +LABEL maintainer="Duarte Santos https://gitea.com/DuarteSantos" \ org.opencontainers.image.title="opengym-web" \ org.opencontainers.image.description="Frontend for Self-hosted gym & body-weight tracker — plan routines, log workouts (supersets & cardio too), track your weight and progress, passkey login. Your data, your server." \ - org.opencontainers.image.source="https://github.com/DuarteSantos8/openGym" \ - org.opencontainers.image.url="https://ghcr.io/duartesantos8/opengym-web" \ - org.opencontainers.image.documentation="https://github.com/DuarteSantos8/openGym#readme" \ + org.opencontainers.image.source="https://gitea.com/DuarteSantos/openGym" \ + org.opencontainers.image.url="https://gitea.com/DuarteSantos/-/packages/container/opengym-web" \ + org.opencontainers.image.documentation="https://gitea.com/DuarteSantos/openGym#readme" \ org.opencontainers.image.licenses="AGPL-3.0-or-later" \ org.opencontainers.image.version=$VERSION \ org.opencontainers.image.revision=$VCS_REF \