@simplewebauthn reports a mismatch as "Unexpected RP ID hash", which tells a self-hoster nothing about their own .env — and this is the most common support question in #install-help, where charliebelt is currently stuck behind a Cloudflare Tunnel with values that look right. The error now names both configured values back and points at the docs. Neither is a secret: one is the address bar, the other its hostname. Extracted as api/verify-error.js so it can be tested without booting a server that opens files and a port, following push-messages.js. SELF_HOSTING.md gets the diagnosis in order: read what the server logged on startup (it prints rpID and origin, and `docker compose restart` does not re-read .env), then the exact shape of each value as a table, then the reverse-proxy case, then www., then that changing the hostname invalidates existing passkeys. Plus the thing adam934912 called a blocker: on a LAN without certificates there is nothing to configure that makes passkeys work.
33 lines
1.3 KiB
Docker
33 lines
1.3 KiB
Docker
FROM node:22-alpine
|
|
|
|
ARG VERSION=dev
|
|
ARG VCS_REF=dev
|
|
ARG BUILD_DATE=unknown
|
|
|
|
LABEL maintainer="Duarte Santos https://gitlab.com/DuarteSantos8" \
|
|
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://gitlab.com/DuarteSantos8/opengym" \
|
|
org.opencontainers.image.url="https://gitlab.com/DuarteSantos8/opengym/container_registry" \
|
|
org.opencontainers.image.documentation="https://gitlab.com/DuarteSantos8/opengym#readme" \
|
|
org.opencontainers.image.licenses="AGPL-3.0-or-later" \
|
|
org.opencontainers.image.version=$VERSION \
|
|
org.opencontainers.image.revision=$VCS_REF \
|
|
org.opencontainers.image.created=$BUILD_DATE
|
|
|
|
WORKDIR /app
|
|
COPY package.json package-lock.json* ./
|
|
RUN npm install --omit=dev && npm cache clean --force
|
|
COPY server.js push-messages.js verify-error.js ./
|
|
|
|
ENV NODE_ENV=production
|
|
ENV PORT=3000
|
|
|
|
EXPOSE 3000
|
|
CMD ["node", "server.js"]
|
|
|
|
HEALTHCHECK --interval=5m \
|
|
--timeout=5s \
|
|
--retries=3 \
|
|
CMD wget --spider -q "http://127.0.0.1:${PORT}/api/health" || exit 1
|