Commit Graph

32 Commits

Author SHA1 Message Date
Georges-Antoine Assi
41fd1eb6f1 wrap debugpy in DEV_MODE 2026-06-07 13:03:23 -04:00
Georges-Antoine Assi
e1bb3901b4 add debuggability 2026-06-07 09:16:50 -04:00
Georges-Antoine Assi
619e03ab32 fix: stop serving private user assets via unauthenticated nginx static route
The default Docker image symlinked /romm/assets into the nginx static web
root (/assets/romm/assets), where it was served by an unauthenticated
`location /assets { try_files ... }` block. /romm/assets holds private user
data (save files, save states, screenshots, avatars) that is meant to be
accessible only through the authenticated /api/raw/assets/{path} route
(Scope.ASSETS_READ). The static symlink bypassed that protection, letting any
unauthenticated caller read another user's files given a (guessable) path.
Avatar URLs leaked the hex user ID through the same static route, making path
construction straightforward.

Fix:
- Drop the /romm/assets symlink from the Docker image build and both
  entrypoint scripts; only /romm/resources (public cover art, screenshots,
  manuals) remains statically served.
- Point the frontend avatar URLs at the authenticated /api/raw/assets/ route
  instead of /assets/romm/assets/. Browser <img> loads authenticate via the
  existing session cookie.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 17:34:30 -04:00
Georges-Antoine Assi
ba25477a2d changes from bot review 2026-05-17 19:07:57 -04:00
Georges-Antoine Assi
887bdad0ef mark local 2026-05-17 17:52:47 -04:00
Georges-Antoine Assi
3557850701 refactor 2026-05-17 17:52:14 -04:00
Georges-Antoine Assi
51f0522193 undo 2026-05-17 17:39:47 -04:00
Georges-Antoine Assi
ea22b06502 fix(sync): export SYNC_BASE_PATH so the Python child inherits it
The shell fallback was assigned locally but never exported, so
sync_watcher.py and the Python config layer never saw the resolved
value. They happened to land on the same /var/lib/romm/sync default by
coincidence; export it so the shell and Python defaults stay linked
through a single source of truth.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 17:22:54 -04:00
Georges-Antoine Assi
e5c9d0faf7 fix(sync): create SYNC_BASE_PATH at startup before watching
The prod Dockerfile creates /var/lib/romm/sync at build time, but if a
user overrides SYNC_BASE_PATH to a path that doesn't exist (or runs the
dev entrypoint, which never created the default), watchfiles fails to
start because its target directory is missing. Have both entrypoints
mkdir -p the resolved path before handing it to watchfiles.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 14:12:16 -04:00
Georges-Antoine Assi
10d3eb2079 feat(sync): default SYNC_BASE_PATH to /var/lib/romm/sync
Move the sync staging folder out of ROMM_BASE_PATH so it lives on a
dedicated writable mount. This lets the container run with a read-only
root filesystem without losing in-flight save uploads, and keeps
app-owned state separate from the user-curated library volume.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 09:28:39 -04:00
Georges-Antoine Assi
faed12e407 remove log-level from rqscheduler 2026-05-08 19:30:43 -04:00
Georges-Antoine Assi
485b6af0dd fix: wire LOGLEVEL into gunicorn logger level and RQ worker/scheduler
The gunicorn logging config hard-coded level=INFO, ignoring LOGLEVEL.
Patch it at startup via sed. Also pass --logging_level to rq worker
and rqscheduler so their framework logging respects LOGLEVEL.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 10:09:03 -04:00
Georges-Antoine Assi
f13f929d7d tweaks based on self review 2026-03-14 22:26:53 -04:00
Georges-Antoine Assi
a1519a4b05 Make default ROMM_AUTH_SECRET_KEY consistent between workers 2025-08-15 12:46:46 -04:00
Michael Manganiello
76db0ab98c feat: Migrate watcher to use watchfiles library
The `watchfiles` library supports event batching, which allows us to
process multiple filesystem changes in a single run.

This change also avoids database calls in the watcher as much as
possible.
2025-08-07 13:28:49 -03:00
Georges-Antoine Assi
836e7358c2 fix issues from code review 2025-08-07 09:34:43 -04:00
Georges-Antoine Assi
64493348b9 add ignores for shellcheck 2025-08-06 23:30:32 -04:00
Georges-Antoine Assi
7e0cb2272d run watchdog as a native task 2025-08-06 23:25:47 -04:00
Georges-Antoine Assi
e156158a3e fixse from bot review 2025-08-06 22:16:46 -04:00
Georges-Antoine Assi
dd6669ebd5 fix pythonpath 2025-08-06 22:08:28 -04:00
Georges-Antoine Assi
6b307afcd3 Run worker as a native process 2025-08-06 21:57:32 -04:00
Georges-Antoine Assi
a841f8e756 fix creating symlinsk devmode 2025-07-05 15:10:08 -04:00
Georges-Antoine Assi
346c24e66e Merge pull request #2045 from rommapp/url-search-params
Use URL to store and load search params
2025-07-05 09:56:56 -04:00
Georges-Antoine Assi
e8f8f1621c complete migration to uv 2025-07-04 09:54:04 -04:00
Georges-Antoine Assi
5552cea059 cleanup sylinks 2025-07-02 13:03:24 -04:00
Georges-Antoine Assi
393c886a80 final tweaks 2025-06-19 09:54:00 -04:00
Georges-Antoine Assi
e0a1df1c6f ignore trunk 2025-06-18 23:53:21 -04:00
Georges-Antoine Assi
0ba3f21d44 wut 2025-06-18 23:51:17 -04:00
Georges-Antoine Assi
0fc29d33db Update entrypoint.sh
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-18 23:49:44 -04:00
Georges-Antoine Assi
f4caf4c7da running app with HMR 2025-06-18 23:23:09 -04:00
Georges-Antoine Assi
55afea70ba more progress on docekrfile 2025-06-09 17:14:40 -04:00
Georges-Antoine Assi
c5f2f59855 Start working on dev dockefile 2025-06-09 13:41:27 -04:00