Database

Nomatron is in early access. Some advanced workflows may not be covered in the public docs.

This file covers database bootstrap commands.

Commands

  • nomatron database init

When To Use It

  • Use it when setting up a fresh environment, before the first server start.
  • Use it in initial provisioning workflows.

database init validates configuration the same way nomatron server does. It needs:

  • a PostgreSQL connection string, from the config file, NOMATRON_DB_URL, --database-url-file, or --database-url-stdin;
  • NOMATRON_ENCRYPTION_KEY (32 bytes, or base64 of 32 bytes); and
  • in the default connected licence mode, NOMATRON_LICENSE_KEY and NOMATRON_CLUSTER_KEY.

How To Use It

bash
nomatron database init --config /etc/nomatron/nomatron.hcl

Examples

Initialize the database before starting the server, with secrets read from files:

bash
export NOMATRON_ENCRYPTION_KEY="$(cat /run/secrets/nomatron_encryption_key)"
nomatron database init \
  --config /etc/nomatron/nomatron.hcl \
  --database-url-file /run/secrets/nomatron_db_url \
  --root-password-file /run/secrets/nomatron_root_password
nomatron server --config /etc/nomatron/nomatron.hcl

See Database Initialization for the full flow.