{# Deploy an application. The panel exists to deploy web applications and, until this screen, could not deploy one: POST /api/apps had no caller anywhere in the interface. An operator could look at everything and create nothing. The form is boosted: htmx sends the submission, which is what puts the CSRF header on it - a plain form cannot set one, so the browser's own submit came back 403 every time, exactly like the sign-out button once did. A deployment is still worth a whole screen and a full navigation: submitting lands on the activity screen with the log drawer attached, and a refusal brings this form back with the reason and everything still typed in. Each field that can be checked cheaply is checked as it is left, by posting the form to /apps/new/validate/{field} and swapping the verdict in under the field. The check is a courtesy; the guard stays at the chokepoint the JSON API uses. Only what a deployment cannot proceed without is asked up front. Everything else lives under Advanced, collapsed, and the type-specific questions only appear for the type that will read them: the fragment under the type select swaps when the selection changes. #} {% extends "base.html" %} {% import "_macros.html" as m %} {% block title %}Deploy{% endblock %} {% block content %} {{ m.page_head("Deploy an application", "From a Git repository, an archive or a directory on this machine") }} {% if problem %} {{ m.problem(problem.fix, problem.output) }} {% endif %}
The same deployment from a terminal:
wasm create -d example.com -s https://github.com/you/app