We use Kamal to deploy all apps.
- Read about best practices for SSH keys
Generate keys:
ssh-keygen -t ed25519 -f ~/.ssh/respiro -C "{NAMEOFKEYHOLDER}"
Ask someone with access to put it in authorized_keys
on the app server.
You can add an alias to deploy when you’re in the root folder of the project:
bd='./gradlew build -x test && kamal deploy --skip-hooks'
This will create a jar file which is used in the Dockerfile
that is used by Kamal to create an image
and run the container on the server.
For a multi-module project the gradle command might look different:
# for example reai accounting system is a multi-module project where the deployable web app is a module
./gradlew :web-app:build && kamal deploy --skip-hooks