Updates

Checkin keeps itself up to date, with a backup and a way back.

Checkin keeps itself up to date like Boogle, Hackly and IndieStats (app/Updates is the same code). Administrators find Updates in the sidebar: the installed release, the newest one, Check now, Update to … and Force update, the channel and the nightly update.

  • Channels: Stable installs the release tags (1.2.3; v1.2.3 and 1.2 are accepted too) and nothing in between; Beta follows the head of main.
  • Never backwards: a build is installed only when it contains the installed one.
  • Every night at APP_UPDATE_TIME (04:00 by default) while automatic updates are on; an update asked for on the page starts within a minute (app:update pending runs every minute). Both run from the scheduler: * * * * * php artisan schedule:run is required.
  • Safe: each update backs up the database, installs the build, runs composer install --no-dev, builds the assets when the release does not carry public/build, migrates, rebuilds the caches, restarts the queue workers and checks that Checkin boots. If a step fails, the previous code and the database come back. The log of the last run is on the page and in storage/app/updates/update.log.
  • Works for a git checkout (updated in place, maintenance mode for a moment) and for a releases/ + current + shared/ deploy (Cipi, Deployer: a new release is built next to the running one, then current switches).
  • Off in local environments (APP_UPDATES=false or APP_ENV not production): update with git.
    Terminal
    php artisan app:update status          # what the last check and the last run said (JSON)
    php artisan app:update check           # what the channel would install
    php artisan app:update apply [--force] # update now (--auto: only while automatic updates are on)
    php artisan app:update channel stable  # or beta
    php artisan app:update auto off        # or on

The VERSION file at the root is the installed version and must match the release tag.