license install, run in a one-off container. Docker Compose and AWS Fargate show how on each platform.
License
The license file is one signed line of text that TablePro issues for your API address. It sets the seats, the features and the end of the license, and every seat includes Pro on the Mac. A staging server needs a file of its own for its own address.license install <file>, or license install - to read the file from standard input, checks the file and installs it in place of the one installed. It refuses a file that:
- was not signed by TablePro, or names another address than
https://plusAPI_HOST; - is past its grace;
- is older than the installed file of the same license;
- is perpetual, and its maintenance ended before this release.
license status prints the license and file IDs, the type, the seats, the end and the grace, or a perpetual file’s end of maintenance, the address, the features and the state, then seats taken: <taken> of <seats>. With no file installed, it prints no license: no license is installed.
Renew
A renewal, or a change of seats, is a new file: install it the same way. A file with fewer seats than are taken keeps everyone who has one, and no one new signs in until enough seats are freed under Remove someone.When a license ends
A file with an end date has a grace after it, written into the file: 7 days for a monthly license, 30 days for every other.
A perpetual file has no end date. It covers every release dated up to its end of maintenance, and keeps them running for good.
migrate up, serve and license install refuse a later release and name the last date the file covers; migrate up refuses before it changes the schema. Extending maintenance is a new file with a later date.
Upgrades
- One minor version at a time, such as 0.1 to 0.2, then 0.2 to 0.3. Each release’s migrations only promise that the release before it runs on the new schema. To skip a minor version, stop the old server first.
- Back up first. Migrations only go forward, so going back to the earlier release means restoring the backup taken before the upgrade.
- A perpetual license must cover the new release;
migrate uprefuses it otherwise, before it changes anything.
TABLEPRO_IMAGE in .env to the new digest, then run the migrations while the old server still serves, and start the new one only once they exit 0:
migrate fails never starts app. The old task keeps serving and the circuit breaker rolls the deployment back, but it cannot undo a migration that ran.
Back up
Back up the database, and keep theTABLEPRO_CREDENTIALS value next to the backups: a database restored without its identity-tokens key cannot read the IdP refresh tokens it holds.
- Docker Compose:
docker compose exec -T postgres pg_dump -U tablepro -Fc tablepro > tablepro.dump - AWS: RDS automated backups, and
aws rds create-db-snapshotbefore each upgrade.
Restore a backup
A restore rolls the Team Library back, while the Macs hold positions past it.sync new-epoch makes every Mac take a fresh copy of the library from the restored server.
1
Stop the server
docker compose stop app, or set the service’s desired count to 0.2
Restore the database
With Compose, into an empty database:On AWS, restore the RDS instance to a point in time as a new instance, and point
DATABASE_URL in a new task definition revision at it.3
Start a new library epoch
Once, before the server starts:
docker compose run --rm --no-deps app sync new-epoch, or the same command as a one-off task on AWS.4
Start the server
docker compose up -d, or the desired count back to 1.Everything written after the restore point is lost, including what Macs published after it. The Macs take the restored library and drop their newer copy.
Alerts
The server writes one JSON object per line to standard output, withlevel and msg. Alert on:
The server also logs these events once a day and at each start. A metric filter
{ $.msg = "license*" } catches the license ones, along with license active at INFO.
email not sent at INFO is expected: a self-hosted server sends no email.
