Skip to content
Rulemapping

Automation Platform Documentation

Finalization

First start: populate the application directory

Section titled “First start: populate the application directory”
Terminal window
docker compose up -d ktdocker
sleep 5

rw/bin/cms.sh does not exist before this run, which is why the commands in the next sections cannot come first.

Check that the directory was populated:

Terminal window
ls -l rw/bin rw/lisp rw/xin rw/etc rw/var/secret
Terminal window
docker compose stop ktdocker

restart: unless-stopped restarts the container on every exit, with an exponentially increasing delay but without ever giving up. Left alone it would keep flapping through the next steps — filling the log and, in the worst case, letting a half-started application touch the database while /finish-installation is working on it.

An explicit stop is the one thing that policy honours: this is what distinguishes unless-stopped from always. The container stays down until you bring it up at the end.

/finish-installation populates the _ktbsversion table that pg.sql created, which is what makes the schema usable for this application version.

Terminal window
docker compose --profile tools run --rm cms /finish-installation

The command runs in a separate container with the same image and mounts, so it works whether or not the application container is currently up.

Large files are stored on disk instead of in the database. This is strongly recommended for performance.

Terminal window
docker compose --profile tools run --rm cms \
/make-disk-pool default /rwshared/pool/
Terminal window
source ./rap.config.sh
docker compose --profile tools run --rm -it cms \
/reset-administrator "$ADMIN_EMAIL"

You are prompted for a password. The same command serves later on: with a known address it resets that user’s password, with a new one it creates a further administrator. Either way the account gets administrator rights, and the command reports which of the two it did.

Now bring both services up — this is the first start that is expected to succeed:

Terminal window
docker compose up -d
docker compose ps

Both services must reach state healthy. ktdocker may need up to two minutes for its first health check — that is the configured start_period.

Terminal window
source ./rap.config.sh
# Directly against the container
curl -s "http://127.0.0.1:8080/$PREFIX/" | grep __ac_password

A hit on __ac_password means the login page is being served and the installation succeeded.

Once your reverse proxy is in place, check it from outside as well:

Terminal window
curl -s "https://$PREFIX.$DOMAIN/$PREFIX/" | grep __ac_password

Or simply open the URL in a browser and log in with the administrator account you just created.