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.
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.
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.
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
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.
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.
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.