New step 6 (remote/db_login.sh), after .env names the version and before the broker and the engine: on a host with the bundled database, a container of the engine image being deployed (python -m netork.core.db_role_env, --network none) rewrites .env so the owner URL becomes MIGRATION_DATABASE_URL and DATABASE_URL a netork_app login with a password made on the host. Written in place (owner and mode kept), nothing of the file printed.
No bundled database, an image from before the module, .env separated already, or RESTRICTED_DB_LOGIN=off: .env stays as it is, the deploy goes on.
Any other failure: exit 1, .env as it was, the deploy stops before the engine is touched.
Safe to merge before the netOrk PR: current images lack the module, so nothing changes until a deploy of an image that has it.
Tests: tests/test_remote_db_login.py (fake docker: changed, nothing to do, no bundled database, old image, failure), tests/test_deploy_db_login.py (command, order, failure stops before broker/engine); whole suite 83 passed locally. shellcheck is not installed locally; CI checks it.
Part of NetOrk/netork#2937.
New step 6 (`remote/db_login.sh`), after `.env` names the version and before the broker and the engine: on a host with the bundled database, a container of the engine image being deployed (`python -m netork.core.db_role_env`, `--network none`) rewrites `.env` so the owner URL becomes `MIGRATION_DATABASE_URL` and `DATABASE_URL` a `netork_app` login with a password made on the host. Written in place (owner and mode kept), nothing of the file printed.
- No bundled database, an image from before the module, `.env` separated already, or `RESTRICTED_DB_LOGIN=off`: `.env` stays as it is, the deploy goes on.
- Any other failure: exit 1, `.env` as it was, the deploy stops before the engine is touched.
Safe to merge before the netOrk PR: current images lack the module, so nothing changes until a deploy of an image that has it.
Tests: `tests/test_remote_db_login.py` (fake docker: changed, nothing to do, no bundled database, old image, failure), `tests/test_deploy_db_login.py` (command, order, failure stops before broker/engine); whole suite 83 passed locally. shellcheck is not installed locally; CI checks it.
remote/db_login.sh runs after .env names the version and before the broker
and the engine: a container of the engine image being deployed
(python -m netork.core.db_role_env) rewrites .env so that the owner's URL
becomes MIGRATION_DATABASE_URL and DATABASE_URL a netork_app login with a
password made on the host; netork-api's db_init creates the role. No bundled
database, an image from before the module, an .env separated already or
RESTRICTED_DB_LOGIN=off: .env stays as it is. Any other failure stops the
deploy before the engine is touched.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Part of NetOrk/netork#2937.
New step 6 (
remote/db_login.sh), after.envnames the version and before the broker and the engine: on a host with the bundled database, a container of the engine image being deployed (python -m netork.core.db_role_env,--network none) rewrites.envso the owner URL becomesMIGRATION_DATABASE_URLandDATABASE_URLanetork_applogin with a password made on the host. Written in place (owner and mode kept), nothing of the file printed..envseparated already, orRESTRICTED_DB_LOGIN=off:.envstays as it is, the deploy goes on..envas it was, the deploy stops before the engine is touched.Safe to merge before the netOrk PR: current images lack the module, so nothing changes until a deploy of an image that has it.
Tests:
tests/test_remote_db_login.py(fake docker: changed, nothing to do, no bundled database, old image, failure),tests/test_deploy_db_login.py(command, order, failure stops before broker/engine); whole suite 83 passed locally. shellcheck is not installed locally; CI checks it.