Commit Graph

147 Commits

Author SHA1 Message Date
Georges-Antoine Assi
6c95a03746 Read-only kiosk mode for viewers 2025-02-06 09:04:41 -05: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
Georges-Antoine Assi
969d16b3ba Add new env to config 2025-01-01 13:35:08 -05: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
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
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
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
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
Zurdi
408f9d2e1d improved config file unit test handling 2024-06-13 23:07:57 +02:00
Georges-Antoine Assi
fcb34f9088 Merge branch 'master' into trunk-io 2024-05-23 10:06:13 -04:00
Georges-Antoine Assi
2a980a04e6 last bits of fixes 2024-05-21 17:52:13 -04:00
Georges-Antoine Assi
b2085f87a8 bunch of fixes for trunk 2024-05-21 17:10:11 -04:00
Georges-Antoine Assi
a7cf0d389a run trunk format on all files 2024-05-21 10:18:13 -04:00
Georges-Antoine Assi
66510c0327 Improve fetch times of platforms endpoint 2024-05-18 17:24:07 -04:00
Georges-Antoine Assi
9ad28f3294 more refactoring again 2024-05-05 16:32:40 -04:00
Georges-Antoine Assi
eca1eb1136 model and scanning 2024-05-01 15:27:16 -04:00
HellLord
98f60fb001 adds more configuration for external redis
add env vars: REDIS_USERNAME, REDIS_DB

Co-Authored-By: Zurdi <34356590+zurdi15@users.noreply.github.com>
Co-Authored-By: Georges-Antoine Assi <3247106+gantoine@users.noreply.github.com>
2024-04-14 22:01:31 +06:00
Georges-Antoine Assi
eda6d78c4b add env to disable auth on download endpoint 2024-04-04 15:27:07 -04:00
Georges-Antoine Assi
4174b9753e remove mame from scheduled tasks and embed fixture 2024-03-26 16:49:02 -04:00
Zurdi
d283214643 Merge branch 'master' into mobygames-new-api 2024-03-26 09:11:40 +01:00
Georges-Antoine Assi
41d0d2eb46 more dir creating up in dockerfile + add redis password 2024-03-25 15:30:27 +00:00
zurdi
8006b4782b Merge remote-tracking branch 'origin/master' into mobygames-new-api 2024-03-19 18:18:41 +01:00