A basic example of a Rust web app deployment with the excellent Kamal
-
Copy the example config:
cp config/deploy.example.yml config/deploy.yml
-
Edit
config/deploy.ymlto suit your requirements. -
Install Kamal if you don't have it already or use docker if the limitations of using it that way are acceptable to you - more info here.
-
Run
kamal init -
Set your
KAMAL_REGISTRY_PASSWORDin your environment and edit your .kamal/secrets file to read it. There are a variety of ways to do this - the 1Password integration is particularly neat.If using docker you can hard-code your secrets in that file but be sure to add it to
.gitignoreand NEVER commit it to git! -
Now you can deploy with:
kamal setup