Kamal is an open source tool to deploy web apps anywhere. It simplifies the process of deploying and managing your web app in production with Docker.
/posts
endpoint by updating config/routes.rb
:
.kamal/secrets
to copy the key from the environment:
config/deploy.yml
file to make it load from .env
, and include your docker registry and the service names in place:
ubi
to root
. We use root
because Kamal installs Docker and connects to it on the VMs. Using root
avoids the need to manage users and groups.config/master.key
and paste it into the .env
file:
.env
file:
config/deploy.yml
:
config/deploy.yml
file to set the hostname for the application:
config/deploy.yml
to pass the environment variables:
config/database.yml
to use the DATABASE_URL
environment variable, which will already contain the user, password and the database name: