diff --git a/docker-compose.yml b/docker-compose.yml index 6e71e811..190008ab 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -38,13 +38,14 @@ services: - CACHE_AXES=redis:6379/0 - CSRF_TRUSTED_ORIGINS=http://localhost:9000 - CSRF_COOKIE_SAMESITE=Strict - - CSRF_COOKIE_SECURE=False + - CSRF_COOKIE_SECURE=True - SESSION_COOKIE_SAMESITE=Strict - - SESSION_COOKIE_SECURE=False - - TWO_FACTOR_FORCE_OTP_ADMIN=False - - TWO_FACTOR_PATCH_ADMIN=False + - SESSION_COOKIE_SECURE=True + - SESSION_COOKIE_AGE=900 + - OIDC_RENEW_ID_TOKEN_EXPIRY_SECONDS=900 - MYKN_API_URL=http://localhost:9000 - MYKN_API_PATH=/api/v1 + # - OPEN_ZAAK_ADMIN_BASE_URL=https://openzaak.example.nl depends_on: - db - redis diff --git a/docs/developers/environment-variables.rst b/docs/developers/environment-variables.rst index 1594a064..2898b051 100644 --- a/docs/developers/environment-variables.rst +++ b/docs/developers/environment-variables.rst @@ -13,9 +13,64 @@ Backend (Django) * - Variable - Description - Default - * - ``FOO`` - - Bar - - ``"bla"`` + * - ``ENVIRONMENT`` + - A label for the environment + - ``"test-maykin"`` + * - ``ALLOWED_HOSTS`` + - See `Django docs `__ + - ``localhost`` + * - ``DJANGO_SETTINGS_MODULE`` + - Path to the Django settings module to use. + - ``openbeheer.conf.docker`` + * - ``SECRET_KEY`` + - See `Django docs `__. Can be generated with tools like https://djecrety.ir/. + - ``someSecretKey`` + * - ``DB_NAME`` + - Name of the database. + - ``openbeheer`` + * - ``DB_USER`` + - Name of the database user. + - ``openbeheer`` + * - ``DB_HOST`` + - Database hostname. + - ``localhost`` + * - ``DB_PORT`` + - Database port. + - ``5432`` + * - ``CACHE_DEFAULT`` + - Address of the cache to use for the default cache. + - ``redis:6379/0`` + * - ``CACHE_AXES`` + - Address of the cache to use for the axes cache. + - ``redis:6379/0`` + * - ``CSRF_TRUSTED_ORIGINS`` + - See the `Django docs `__. + - ``http://localhost:9000`` + * - ``CSRF_COOKIE_SAMESITE`` + - See the `Django docs `__. + - ``Strict`` + * - ``CSRF_COOKIE_SECURE`` + - See the `Django docs `__. + - ``True`` + * - ``SESSION_COOKIE_SAMESITE`` + - See the `Django docs `__. + - ``Strict`` + * - ``SESSION_COOKIE_SECURE`` + - See the `Django docs `__. + - ``True`` + * - ``SESSION_COOKIE_AGE`` + - See the `Django docs `__. + - ``900`` + * - ``OIDC_RENEW_ID_TOKEN_EXPIRY_SECONDS`` + - Should be the same as ``SESSION_COOKIE_AGE``. + - ``900`` + * - ``OPEN_ZAAK_ADMIN_BASE_URL`` + - The url of the Open Zaak that will be used to reference back to Open Zaak when features are not available in Open Beheer. + - ``https://openzaak.example.nl`` + + +Frontend (React) +---------------- Frontend (React) ---------------- @@ -28,14 +83,31 @@ Frontend (React) - Description - Default * - ``MYKN_API_URL`` - - Base URL for the backend API. - - ``http://localhost:5173`` + - Base URL of the backend API. Falls back to the current origin when not set. + - ``window.location.origin`` * - ``MYKN_API_PATH`` - - Path to the API. + - Base path for all API requests. - ``/api/v1`` + * - ``MYKN_CACHE_DISABLED`` + - Disable all frontend caching when set to ``"true"``. + - ``false`` + * - ``MYKN_CACHE_PREFIX`` + - Prefix used for frontend cache keys. + - ``oab.lib.cache`` + * - ``MYKN_CACHE_MAX_AGE`` + - Maximum age of cached frontend data in milliseconds. + - ``600000`` + * - ``MYKN_CO_REVIEW_POLL_INTERVAL`` + - Poll interval in milliseconds for checking co-review updates. + - ``3000`` + * - ``MYKN_ZAAK_URL_TEMPLATE`` + - Template string used to format links to a zaak in Open Zaak. + The template is interpolated with zaak data at runtime. + - ``""`` Notes ----- - All frontend environment variables **must** start with ``MYKN_`` to be exposed to the app during build time. - +- Frontend defaults are applied at runtime when environment variables are not set. +- Changes to frontend environment variables require rebuilding the React application. diff --git a/docs/developers/index.rst b/docs/developers/index.rst index 8094eeb8..f64099d4 100644 --- a/docs/developers/index.rst +++ b/docs/developers/index.rst @@ -9,3 +9,4 @@ This section is for developers working on the project. setup-local-environment environment-variables health-checks + release-flow diff --git a/docs/developers/release-flow.rst b/docs/developers/release-flow.rst new file mode 100644 index 00000000..a8e72e22 --- /dev/null +++ b/docs/developers/release-flow.rst @@ -0,0 +1,29 @@ +.. _developers_release: + +============ +Release flow +============ + +#. Checkout a branch ``release/X.X.X`` (with the new version number) +#. In the root folder, use ``bump-my-version show-bump`` to show the possibilities, for example: + + .. code:: bash + + bump-my-version show-bump + + 0.1.0 ── bump ─┬─ major ─ 1.0.0 + ├─ minor ─ 0.2.0 + ├─ patch ─ 0.1.1 + ├─ pre_l ─ invalid: The part has already the maximum value among ['', 'alpha', 'beta', 'rc', 'final'] and cannot be bumped. + ╰─ pre_n ─ 0.1.0-final.1 + +#. Bump the version. For example ``bump-my-version bump major``. +#. In the ``frontend/`` folder, run ``npm install`` to also update the ``package-lock.json`` file after the ``package.json`` has been bumped. +#. In the ``backend/`` folder, run ``./bin/make_translations.sh`` and check if any translations need changing. +#. In the ``backend/`` folder, run ``./bin/update_oas.sh`` to update the OAS. +#. Update the ``CHANGELOG.md`` file. +#. Commit the changes and push the branch. +#. Once the branch is approved, merge it into main. +#. Create a tag with ``git tag -a 1.0.0 -m ":bookmark: Release 1.0.0"``. +#. Push the tag with ``git push origin 1.0.0``. +#. Once the new image has been pushed to Dockerhub, celebrate! 🎉 \ No newline at end of file