Observability

Terminal

Open a shell in any running replica of an app from the app's Terminal tab, with one-click artisan commands for Laravel apps.

Using it

The Terminal tab picks a replica (web replicas and processes, by server) and opens a shell in its container: bash if the image has it, else sh, in the image's working directory, on a real TTY (colours, tinker, top, resizing). Laravel apps get buttons that type and run php artisan tinker, about, migrate:status, queue:failed, route:list and optimize:clear.

The shell runs as the user the app runs as when that isn't root: apps built with the laravel build template (nginx and PHP-FPM, whose workers run as www-data) get www-data, with HOME=/tmp (tinker keeps its history there), so caches and files artisan writes stay writable by the app. Other images, Octane's included, get the image's user; so does an image without www-data (a repo's own Dockerfile). The container's variables are the shell's.

What the shell changes outside volumes lasts until the container is replaced, at the next deploy.

Sessions

Closing the tab or Disconnect ends the session, and so does the server's agent reconnecting or the panel restarting; nothing is left running in the container. A browser that can't keep up with the output has its session ended. At most 16 sessions are open on a server at once.

Access

Any signed-in user can open a terminal, as anyone can deploy apps. Each session is logged: who, which replica, and as which user.