Add initial .env.sample and compose.yaml for openGym service configuration
This commit is contained in:
33
komodo/general-purpose/opengym/.env.sample
Normal file
33
komodo/general-purpose/opengym/.env.sample
Normal file
@@ -0,0 +1,33 @@
|
||||
# openGym - self-hosted gym & body-weight tracker
|
||||
# https://github.com/DuarteSantos8/openGym
|
||||
|
||||
# Passkeys are bound to the exact hostname and require HTTPS (localhost excepted).
|
||||
# Point your reverse proxy at WEB_PORT and set these to the public domain.
|
||||
RP_ID=gym.yourdomain.com
|
||||
ORIGIN=https://gym.yourdomain.com
|
||||
RP_NAME=openGym
|
||||
|
||||
# Host port for the web UI
|
||||
WEB_PORT=8095
|
||||
|
||||
# Host path for app data (users, passkeys, session secret, uploads)
|
||||
DATA_PATH=./data
|
||||
|
||||
# First profile created becomes admin (1/0)
|
||||
FIRST_USER_ADMIN=1
|
||||
# Comma-separated user IDs to grant admin (optional)
|
||||
ADMIN_UIDS=
|
||||
|
||||
# Signup / login options (1/0)
|
||||
INVITE_ONLY=0
|
||||
ALLOW_GUEST=0
|
||||
PASSWORD_LOGIN=0
|
||||
|
||||
# Trust X-Forwarded-For from the web container (leave at 1)
|
||||
TRUST_PROXY=1
|
||||
|
||||
# Cloudflare Tunnel users: set to '$http_cf_connecting_ip' (single quotes included)
|
||||
CF_CONNECTING_IP=
|
||||
|
||||
# Push notification contact (optional), e.g. mailto:you@example.com
|
||||
VAPID_SUBJECT=
|
||||
36
komodo/general-purpose/opengym/compose.yaml
Normal file
36
komodo/general-purpose/opengym/compose.yaml
Normal file
@@ -0,0 +1,36 @@
|
||||
services:
|
||||
# Passkey auth + per-user data (Node API, stores JSON under ./data)
|
||||
api:
|
||||
image: ghcr.io/duartesantos8/opengym-api:latest
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
PORT: 3000
|
||||
DATA_DIR: /data
|
||||
TRUST_PROXY: ${TRUST_PROXY:-1}
|
||||
RP_ID: ${RP_ID:?Variable is required and must be set}
|
||||
ORIGIN: ${ORIGIN:?Variable is required and must be set}
|
||||
RP_NAME: ${RP_NAME:-openGym}
|
||||
FIRST_USER_ADMIN: ${FIRST_USER_ADMIN:-1}
|
||||
ADMIN_UIDS: ${ADMIN_UIDS:-}
|
||||
INVITE_ONLY: ${INVITE_ONLY:-0}
|
||||
ALLOW_GUEST: ${ALLOW_GUEST:-0}
|
||||
PASSWORD_LOGIN: ${PASSWORD_LOGIN:-0}
|
||||
VAPID_SUBJECT: ${VAPID_SUBJECT:-}
|
||||
volumes:
|
||||
- ${DATA_PATH:-./data}:/data # users, passkeys, session secret, uploads - BACK THIS UP
|
||||
|
||||
# React frontend served by nginx, proxies /api -> api (single origin for passkeys)
|
||||
web:
|
||||
image: ghcr.io/duartesantos8/opengym-web:latest
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- api
|
||||
ports:
|
||||
- "${WEB_PORT:-8095}:80"
|
||||
environment:
|
||||
NGINX_PORT: 80
|
||||
BACKEND: api
|
||||
PORT: 3000
|
||||
RESOLVER: 127.0.0.11
|
||||
CF_CONNECTING_IP: ${CF_CONNECTING_IP:-}
|
||||
MEDIA_UPLOAD_MAX: ${MEDIA_UPLOAD_MAX:-48m}
|
||||
Reference in New Issue
Block a user