REPO= Set up Flask on this VM by following the exe.dev recipe at https://exe-staging.dev/deploy/flask.md from top to bottom. The values at the top of this message are mine: - REPO: the GitHub repository to deploy, as owner/name or a URL, or `new` to start a fresh Flask app Ask me for any that still say before you need them. The recipe's example VM name is my-flask. This VM's name is the output of `hostname`: use it wherever the recipe writes my-flask. Skip the step that creates the VM; you are on it. You are done when all of these are true. Check each one yourself: - Your Flask app, or a new Flask 3.1 app with Flask-SQLAlchemy and Flask-Migrate, served by gunicorn behind nginx on port 8000, under systemd and enabled to start after a reboot. - `deploy` (in /usr/local/bin) pulls `~/src` from its origin, builds the commit in a new `~/releases` directory, runs `flask db upgrade`, switches `~/app` to it, restarts and checks it answers; any failure leaves the running release up. - Settings for exe.dev's proxy outside the repository, in `~/app.env` and `~/app-settings`, with a generated secret key, ProxyFix for the forwarded headers, and gunicorn workers sized to the VM. - SQLite in WAL mode at `~/data/app.db` (or the app's own database), with Flask's static folder served by nginx. - The owner's exe.dev email in `FLASK_ADMIN_EMAILS`, and a new app that signs visitors in from the `X-ExeDev-Email` header. - Nightly backups in `~/backups`, with a first one taken and checked. Read the whole recipe, including the closed details, and follow "Set it up by hand" in order, skipping "Create the VM"; the walkthrough above it is for the owner. REPO=new takes "Start a new app"; anything else takes "Bring your repository". If cloning from GitHub fails, the repository is private: give the owner the `ssh exe.dev integrations add github` command from that step, with this VM's name and the repository, wait for them, and clone from github.int.exe.xyz. Never overwrite an existing ~/app.env. Don't commit to the owner's repository or push to its origin. If their app doesn't fit (no factory or `app` object Flask can find, settings read from other variable names, a different database), set FLASK_APP and ~/app.env to fit it and tell the owner what you changed and what their code should read. Leave the VM private and don't reboot: check that app.service, nginx and app-backup.timer are enabled instead. Skip the later Restore and Update instructions; the restore check in setup uses a scratch copy only. Don't turn on the optional timers, worker, or LLM endpoint unless asked. Give the owner https://.exe.xyz/ and, of the two commands at the end, the one that fits REPO. Finish with the URLs I should open and these commands, which only I can run, from my own computer (with this VM's name in them): ssh my-flask.exe.xyz deploy # after each git push to GitHub git clone my-flask.exe.xyz:src my-flask # if you started a new app and it isn't on GitHub yet