Kamal Snippets
Source: Introduction video and documentation from Kamal — Deploy web apps anywhere
# Example setup of a web application and test rundocker build -t myapp .docker run -d -p 8080:80 --name myapp myapp
# Initialize kamal in projectkamal init# Copies kamal configuration files, secrets# Update config/deploy.yml with# - service, contain image, container host server# - SSL settings, DNS, proxy# - accessory like database and restricted port# - network
# deploy.yml file can be duplicated and named differently for a second deployment as an override# the new deploy.htz.yml will reuse original settings and only override settings you choose, for example servers
# Set up host serverkamal setup# Make sure docker is installed, image is push/pulled, set up proxy# Requires project git repository is setup and committed# Set up accessories
# Set up host server given a different config/deploy.htz.yml exists in the projectkamal setup -d htz# config/deploy.htz.yml can override settings in the default config/deploy.yml
# Deploy changeskamal deploy# After project change, build image, push and pull image and deploy
# View logskamal logs
# View logs for alternate configurationkamal logs -d htz
# Go into consolekamal console