Commit Graph

161 Commits

Author SHA1 Message Date
Georges-Antoine Assi
b240191fe9 fix unsetting firmware folder 2025-03-01 23:54:11 -05:00
Michael Manganiello
fac368641c misc: Strip environment variables related to third-party credentials
For client_id/client_secret combinations, and API keys, we are certain
that they should not have leading/trailing whitespaces. We can strip
them to avoid any potential issues for users who might have added them
incorrectly in their Docker Compose configuration.

This change does NOT affect users/passwords, where leading/trailing
whitespaces might be intentional and valid.
2025-02-22 19:57:29 -03:00
Michael Manganiello
9602d58865 misc: Add support for WEB_CONCURRENCY environment variable
The `WEB_CONCURRENCY` environment variable is a more common way to
configure the number of workers for Gunicorn [1] or other web servers.

This change maintains `GUNICORN_WORKERS` compatibility, while notifying
users that it is deprecated and should be replaced with
`WEB_CONCURRENCY`.

It would also allow us to replace Gunicorn with another web server in
the future without changing the variable name.

[1] https://docs.gunicorn.org/en/stable/settings.html#workers
2025-02-19 00:31:34 -03:00
zurdi
d2c2fe6f12 Merge remote-tracking branch 'origin/master' into feature/screenscraper-integration 2025-02-08 20:40:27 +00:00
Georges-Antoine Assi
6c95a03746 Read-only kiosk mode for viewers 2025-02-06 09:04:41 -05:00
zurdi
2ee6026614 Remove SCREENSCRAPER_API_KEY from configuration and handler, replace with decoded credentials 2025-02-05 12:32:16 +00:00
zurdi
9d96501b9e Merge remote-tracking branch 'origin/master' into feature/screenscraper-integration 2025-01-31 00:12:44 +00:00
Michael Manganiello
6f5e0a0ed9 misc: Do not fail if LOGLEVEL is not uppercase
The `logging.setLevel` method expects the log level to be in uppercase.
This change ensures that the `LOGLEVEL` config value is always in
uppercase.
2025-01-20 00:28:43 -03:00
Georges-Antoine Assi
45e11acfa2 [ROMM-1442] Add OIDC_TLS_CACERTFILE path to mounted certfile 2025-01-09 21:20:10 -05:00
zurdi
977d552674 Merge remote-tracking branch 'origin/master' into feature/screenscraper-integration 2025-01-08 13:01:30 +00:00
Georges-Antoine Assi
969d16b3ba Add new env to config 2025-01-01 13:35:08 -05:00
zurdi
0d1b932701 Merge branch 'master' into feature/screenscraper-integration 2025-01-01 17:43:20 +00:00
Michael Manganiello
b9b7a8ccda fix: Make migrations compatible with PostgreSQL
This change only verifies that Alembic can upgrade and downgrade through
all the current migrations. It does not verify that the application
works correctly with PostgreSQL.
2024-12-30 08:36:05 -03:00
Michael Manganiello
7dc7eea34d feat: Initial Sentry support
This change initializes the Sentry SDK, which enables error tracking
when the `SENTRY_DSN` environment variable is set.

Drop-in alternatives to Sentry are also supported, like GlitchTip.
2024-12-27 17:03:45 -03:00
zurdi
ff03d8e125 refactor: Remove OIDC_CREATE_USER configuration and generate an uuid in a OIDC created user password 2024-12-27 14:49:23 +00:00
zurdi
1083dc6e65 Merge remote-tracking branch 'origin/master' into feature/screenscraper-integration 2024-12-27 14:21:41 +00:00
Michael Manganiello
d457ce077e Merge pull request #1396 from rommapp/fix/mysql-support
fix: MySQL migration and driver support
2024-12-27 11:05:55 -03:00
zurdi
ffbebc2f46 fix: Rename CREATE_OIDC_USER to OIDC_CREATE_USER for consistency 2024-12-27 12:32:49 +00:00
zurdi
e52ebcbc5a feat: Add CREATE_OIDC_USER configuration to enable automatic user creation 2024-12-27 12:04:49 +00:00
Michael Manganiello
a0bd575019 fix: MySQL migration and driver support
Trying to run MySQL as database (instead of MariaDB) was failing due to
incompatible migrations and lack of support for the MySQL driver.

These small changes fix the issue and recover the support for MySQL as
database driver.

Support for MySQL is on a best-effort basis, as the project's main
database is MariaDB.
2024-12-27 00:29:28 -03:00
zurdi
374d11b755 Merge remote-tracking branch 'origin/master' into feature/screenscraper-integration 2024-12-26 21:06:35 +00:00
zurdi
7baf1c7937 Fix typo in OIDC_PROVIDER variable name across configuration and authentication files 2024-12-23 16:02:19 +00:00
Georges-Antoine Assi
c3f50d1f12 Add oidc provider name and icon to login page 2024-12-23 09:28:00 -05:00
Georges-Antoine Assi
37db255328 refactor oidc handler and fix tests 2024-12-18 10:49:45 -05:00
zurdi
443def9cd9 Merge remote-tracking branch 'origin/master' into feature/screenscraper-integration 2024-12-10 11:40:44 +00:00
Georges-Antoine Assi
2cd9041e85 Merge branch 'master' into openid-connect 2024-12-09 19:25:44 -05:00
Georges-Antoine Assi
b7dac4743a Merge branch 'master' into openid-connect 2024-12-07 22:19:24 -05:00
Michael Manganiello
743ecd83e7 misc: Fix some typing issues 2024-12-07 12:29:45 -03:00
Georges-Antoine Assi
3abf50b056 changes from self review 2024-11-27 23:28:54 -05:00
Georges-Antoine Assi
11923786be fetch and use rsa key 2024-11-27 22:40:02 -05:00
zurdi
a51dd03e1a Added full offline support and configurable logging level and API requests debug logs 2024-11-27 17:12:13 +00:00
Georges-Antoine Assi
3a91b7ba54 Merge branch 'master' into openid-connect 2024-11-26 19:52:18 -05:00
zurdi
7dfee48eda added ss dev token 2024-10-25 15:22:37 +00:00
zurdi
3a5fd7d688 Merge branch 'master' into feature/screenscraper-integration 2024-10-25 07:24:47 +00:00
zurdi
63fac78743 screenscraper API test 2024-10-25 01:05:58 +00:00
zurdi
c44b27f25b added add and remove features to the frontend + backend 2024-10-24 16:58:46 +00:00
zurdi
310d51fc21 added 'add exclusion' endpoint and enabled UI 2024-10-24 10:13:41 +00:00
Georges-Antoine Assi
5b73c4e6cb Merge pull request #1236 from yuri-becker/feature/configurable-upload-timeout
#1228 Configurable upload timeout
2024-10-14 16:37:26 -04:00
Yuri Becker
eb6a48eb3a Use seconds for UPLOAD_TIMEOUT 2024-10-12 12:50:56 +02:00
Yuri Becker
f68033ed87 Add UPLOAD_TIMEOUT 2024-10-12 03:07:04 +02:00
Michael Manganiello
b81fbc5820 fix: Improve handling of Redis URL
This change replaces the creation of Redis URL, from a simple string
interpolation, to using `yarl.URL`. The main benefit, besides not
forgetting to set all five different variables on every Redis client
initialization, is that user credentials are correctly URL-encoded, if
present.

Up until now, if a password had special characters, it could break the
generated URL.

This change also introduces support for a `REDIS_SSL` setting, which
allows the user to specify if the Redis connection should use SSL or not.
2024-10-11 21:41:19 -03:00
Georges-Antoine Assi
00d34d7388 hack to get emujs working in dev mode 2024-08-30 14:35:37 -04:00
Georges-Antoine Assi
f44d1273b3 Convert string-to-bool in init 2024-08-29 10:50:01 -04:00
Georges-Antoine Assi
330755f99c [ROMM-1107] Add env variable to disable in-browser emulation 2024-08-29 10:09:37 -04:00
Michael Manganiello
a85c84a7d4 misc: Use single SQLAlchemy engine and session maker
As recommended by SQLAlchemy [1], this change makes a single
instantiation of the database engine and session maker, instead of one
entity per handler.

It also uses the provided `URL` constructor to better define the
database URL structure.

[1] https://docs.sqlalchemy.org/en/20/core/connections.html#basic-usage
2024-08-21 09:56:28 -03:00
Michael Manganiello
95a66a182e misc: Improve typing for feed schemas
* Add typing for nested objects in Tinfoil and Webrcade feed schemas.
* Do not send Rom background and thumbnail, if not available.
* Correctly build URLs using `starlette` utils.
* Deprecate the `ROMM_HOST` setting, no longer needed.
* Fix FastAPI custom router to prefer routes without trailing slash.
* Fix Webrcade background URL pointing to gallery screenshot.
2024-08-07 22:56:16 -03:00
Georges-Antoine Assi
cbeac18fea Drop ROMM_AUTH_USERNAME and ROMM_AUTH_PASSWORD env variables 2024-08-07 12:27:58 -04:00
Georges-Antoine Assi
0fae870837 start work with fake openid add for testing 2024-08-04 00:41:34 -04:00
Michael Manganiello
749e4d65c1 misc: Use PYTEST_VERSION variable to detect Pytest runs
Pytest v8.2 introduced the `PYTEST_VERSION` environment variable [1],
that can be used to check if code is running from within a pytest run.

This way, we can avoid checking the loaded `sys` modules.

[1] https://docs.pytest.org/en/stable/changelog.html#id57
2024-07-27 12:03:44 -03:00
Michael Manganiello
ed635d69cc misc: Move fakeredis to test dependencies
`fakeredis` is only needed when running tests, so we can move it to the
`test` dependency group.
2024-06-23 11:10:25 -03:00