Commit Graph

228 Commits

Author SHA1 Message Date
zurdi
693f3e038b refactor: add ASCII art banner to init script and improve debug log output 2025-05-09 15:55:58 +00:00
zurdi
1b38607eab refactor: update Alembic logging configuration and add ASCII art banner to init script 2025-05-09 15:23:32 +00:00
zurdi
22f5134fbb refactor: add Gunicorn logging configuration and update startup script 2025-05-09 10:25:02 +00:00
zurdi
549e5956bf refactor: add initial logging configuration for Gunicorn 2025-05-09 10:24:45 +00:00
zurdi
e6c4a43c1e refactor: improve logging messages and formatting for clarity and consistency across multiple modules 2025-05-09 09:35:13 +00:00
zurdi
53f9386208 refactor: enhance logging messages and formatting for improved clarity and consistency 2025-05-08 23:35:33 +00:00
zurdi
49ad99d5e7 refactor: improve logging setup and format across multiple modules for consistency 2025-05-08 22:17:53 +00:00
zurdi
b3d341bc11 refactor: add TODO comment to check on database disconnection in init script 2025-05-08 17:59:50 +00:00
zurdi
c5033d9967 refactor: enhance logging output with color formatting for improved readability 2025-05-08 17:59:01 +00:00
zurdi
cac9602974 refactor: streamline logging setup and improve log formatting across multiple modules 2025-05-08 17:57:40 +00:00
zurdi
5bc820d3ee refactor: enhance logging and user agent mapping in nginx configuration for improved monitoring 2025-05-08 17:22:30 +00:00
zurdi
d5bb63c06f refactor: improve logging in redis_handler and init scripts for better debugging and process management 2025-05-08 16:34:23 +00:00
zurdi
c01a90caf6 refactor: update Docker image tag to include 'testing' for local builds 2025-05-08 14:36:32 +00:00
zurdi
4c953b6439 refactor: use symbolic links with force option in Dockerfile and improve branch name formatting in build script 2025-05-08 14:30:48 +00:00
zurdi
0f1c29be73 refactor: enhance logging format in init script with color coding for better visibility 2025-05-08 14:17:03 +00:00
zurdi
c0f33545b1 refactor: enhance initialization script with improved logging and process management 2025-05-08 14:04:21 +00:00
zurdi
ad1cd9e0c6 refactor: replace info_debug with debug_log for consistency in logging 2025-05-08 11:31:46 +00:00
zurdi
5d1114b832 refactor: set default web concurrency to reduce resource usage 2025-05-08 10:44:58 +00:00
zurdi
82c265e7d3 refactor: update log messages for consistency and clarity 2025-05-08 10:40:08 +00:00
zurdi
3bd9382b12 refactor: enable scheduled tasks in scheduler and init scripts 2025-05-08 08:59:56 +00:00
Georges-Antoine Assi
5a2362ad1b add folders to dockerignore 2025-03-07 18:09:45 -05:00
Michael Manganiello
85293d320a fix: Make nginx configuration files writable by everyone
As the container entrypoint runs `envsubst` to replace environment
variables in the nginx configuration files, the `/etc/nginx/conf.d` and
its contents must be writable by everyone.

This is needed because a user can set a custom UID/GID to run the
container, and the `envsubst` command will run as that user.
2025-02-22 17:25:15 -03:00
Michael Manganiello
8487d39326 fix: nginx configuration for library access when ROMM_BASE_PATH is set
The nginx configuration was not updated to use the `ROMM_BASE_PATH`
environment variable when serving the library files.

We no longer hardcode the base path to `/romm`, but instead use the
provided path.
2025-02-21 11:44:48 -03:00
Michael Manganiello
c05593db14 fix: Support for assets when using custom ROMM_BASE_PATH
When using a custom ROMM_BASE_PATH, the symbolic links used by nginx to
serve assets were not being updated to point to the correct location,
and always used the default `/romm` base path.

This change introduces a fix in the `docker-entrypoint.sh` script, so
those symbolic links are updated to point to the correct location set by
the `ROMM_BASE_PATH` environment variable.

Fixes #1626.
2025-02-20 00:21:32 -03:00
Michael Manganiello
3c4046e2c3 fix: Nginx alias_traversal warning
Warning triggered by [gixy](https://github.com/yandex/gixy).

Related documentation:
https://github.com/yandex/gixy/blob/master/docs/en/plugins/aliastraversal.md
2025-02-19 09:43:26 -03:00
Michael Manganiello
fbff92403f feat: Allow configuring app port using ROMM_PORT environment variable
By using the `ROMM_PORT` environment variable, users can now configure
the port on which the application listens, which defaults to `8080`.
2025-02-19 01:02:25 -03:00
Michael Manganiello
f6be1a6df3 Merge pull request #1632 from rommapp/misc/nginx-templates
misc: Use nginx templates to allow for environment variable usage
2025-02-19 00:55:34 -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
Michael Manganiello
98254d50b8 misc: Use nginx templates to allow for environment variable usage
Using the `envsubst` command, we can replace environment variables in
the nginx template files. This allows for more flexibility when
configuring the nginx server.

The Docker image we use as base for Nginx does provide the
`20-envsubst-on-templates.sh` script that will replace environment
variables in the template files.

This change does not include any behavior change, but unblocks future
changes that require environment variables in the nginx configuration.
2025-02-18 22:36:51 -03:00
Georges-Antoine Assi
d94dd9a7db Merge branch 'master' into ui-theme-redesign 2025-01-25 22:30:08 -05:00
Michael Manganiello
b683934e09 misc: Migrate optional dependencies to standard pyproject format 2025-01-12 13:55:50 -03:00
Georges-Antoine Assi
6660a9c147 Merge branch 'master' into ui-theme-redesign 2025-01-11 22:45:33 -05:00
Michael Manganiello
573ec47159 misc: Move to py7zr v1.0.0rc2
Stop using `py7zr` fork and move to `1.0.0rc2` release, which includes
decompression streaming support.
2025-01-11 21:36:47 -03:00
Georges-Antoine Assi
d5e2ed0a90 Merge branch 'master' into ui-theme-redesign 2025-01-10 13:50:11 -05:00
Georges-Antoine Assi
ab85bf7cd6 Bump emulatorjs to 4.2.1 2025-01-10 11:01:30 -05:00
Georges-Antoine Assi
a62b4a2612 add new logos to repo 2025-01-07 20:35:51 -05:00
Georges-Antoine Assi
e5f7a0f335 fix trunk check issue in init script 2025-01-07 10:50:19 -05:00
Michael Manganiello
96d7e262ac feat: Stop installing development dependencies in Docker images
This change removes the installation of `dev` and `test` Poetry
dependency groups from the published Docker images.

Developers are still able to use images with development dependencies
installed, by either using the `dev-slim` or `dev-full` targets.

Image size comparison:

* `slim-image`: Down from 455 MiB to 355 MiB.
* `full-image`: Down from 760 MiB to 660 MiB.
2025-01-05 15:51:08 -03:00
Georges-Antoine Assi
4223a6d2c0 copy assets as well 2025-01-04 10:57:29 -05:00
Georges-Antoine Assi
252cbaa5a0 fix it one more time 2025-01-03 22:39:07 -05:00
Georges-Antoine Assi
9abfa13eab fix it second time 2025-01-03 22:14:48 -05:00
Georges-Antoine Assi
3f4704dc9e fix issues from review 2025-01-03 22:09:54 -05:00
Georges-Antoine Assi
44ab32ca5f attempt to load emujs local and fallback to cdn 2025-01-02 20:51:08 -05:00
Georges-Antoine Assi
2a514ac9b5 Merge branch 'master' into docker-slim-images 2025-01-01 13:24:19 -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
Georges-Antoine Assi
85a4d99aa7 fix dockerfile slim build 2024-12-29 14:11:41 -05:00
Georges-Antoine Assi
766c8a1b73 mini refactor 2024-12-29 13:52:27 -05:00
Georges-Antoine Assi
3841ce669b pass slim iamge as env var 2024-12-29 10:06:07 -05:00
Georges-Antoine Assi
78715334fc merge into 1 build file 2024-12-29 00:11:52 -05:00
Michael Manganiello
cfce52e7e5 fix: Copy dashboard-icons to Docker image 2024-12-29 01:25:17 -03:00