Hosting on Digital Ocean - Workflow

Yes, if you’re using the hosted visual editor, a typical workflow is to use the IDE at anvil.works to update your application, then restart the application on your production server after using Git to fetch and merge changes. I’ll typically automate with an ./update.sh script in the folder where anvil-app-server runs, something like:

cd APP_NAME
git fetch origin
git merge origin/master
cd ..
anvil-app-server --app APP_NAME --origin https://yourdomain.com:1234 --dep-id C6ZZPAPN4YYF5NVJ=anvil_extras_main --auto-migrate --port 4043 --disable-tls

I typically run each app in its own tmux session, so that stopping and restarting is easy. I also use Caddy whenever I need to run more than one instance of anvil-app-server over HTTPS (Anvil’s embedded Traefik binary only runs on port 443)

If you’re building your UIs and all configuration files entire with code (i.e., not using the hosted visual editor), then you can simply edit all your files directly on the server.

I posted a cheatsheet and some videos about how to do it all: Anvil-app-server cheatsheet

4 Likes