Necessary to ensure, when folks change the `HANAMI_PORT`, that the port is picked up in the health check so the web service reports as healthy.
Milestone: patch
This is being done to ensure the database, assets, etc are properly setup via the web service before the worker service is launched. This resolves issues with the worker service restarting due to the database not being setup. _This only happens when setting up the application for the first time_. While not recommended as a Docker practice, this seems to be the only way to improve the initial application setup experience.
Milestone: minor
Necessary to ensure assets and migrations are only setup for the _web_ service. This ensures other services, like the _worker_ service, don't end up duplicating this work. The new `APP_SETUP` environment variable controls this behavior and works for both Docker and Render.
The original idea stems from Max but has been modified to support both assets _and_ migrations.
This also fixes a typo in the `compose.dev.yml.tt` to do not adding the end quote in the right place.
Co-authored-by: Max Forasteiro <18661016+maxforasteiro@users.noreply.github.com>
Milestone: minor
Allows the database/keyvalue ports to be configured if desired. We already have the environment variables for these so this extends that capability further.
This also refactors the `pg_isready` CLI options to use long form for improved readability.
Co-authored-by: Brooke Kuhlmann <brooke@alchemists.io>
Milestone: minor
Necessary to ensure this warning stops appearing in the console/logs:
----
WARN[0000] The "CERTIFICATE_URLS" variable is not set. Defaulting to a blank string.
----
By using a safe default value (blank), we can prevent the warning since this environment variable is optional.
Milestone: patch
Provides a new container that runs before web and worker. Calls `bin/docker/install-certificates` to do the install, and saves to a new certificates volume.
Allows for extensions which are fetching data from SSL-protected URLs that don't have publicly-trusted SSL signatures to function.
Co-authored-by: Brooke Kuhlmann <brooke@alchemists.io>
Milestone: minor
This was an accident when cleaning up the envrionment variables where the scheme was switched but needs to be `redis` instead. Both Valkey and Dragonfly use this scheme so this ensures the URL always works for all three providers.
Milestone: patch
As done, in the previous commit to accomidate Valkey, all database environment variables now use the `DATABASE` prefix instead of `PG` which was specific to PostgreSQL. This improves consistency both for environment variables and Docker services.
Issue: 243
Milestone: minor
Necessary to support an open source solution with better licensing. link:https://valkey.io[Valkey] is now the default keyvalue data store.
Use of `keyvalue` instead of `redis` is done to be more generic. This also allows folks to switch to Dragonfly and/or Redis if desired.
Docker was updated to refer to this as the _keyvalue_ service instead of the _cache_ service.
Issue: 243
Milestone: minor
Necessary to improve robustness of the Docker Compose configuration by:
* Ensuring all services restart.
* Ensuring all services have resource limits.
* Ensuring the worker service has access to the `web-uploads` volume as this was causing all Sidekiq jobs to fail to generate screens for extensions.
* Ensuring PostgreSQL has more memory because, out of all services, it needs the most in order to improve performance by not swapping to disk.
* Ensuring Redis doesn't _silently_ evict keys under memory pressure which will cause Sidekiq jobs to be lost. Now Redis will error instead so this is clear and quick to debug.
Milestone: patch
Necessary to match what we use for the web service especially when running this work independently because the worker service is a variant of the web service and has the same requirements.
Milestone: patch
Necessary to ensure Redis is part of the stack when running Docker. This'll soon be used by Sidekiq for processing background jobs.
This includes fixing the `DATABASE_URL` so the port is no longer hard coded but pulled from the `PG_PORT` environment variable.
Milestone: minor