|
|
|
|
@@ -2,11 +2,22 @@
|
|
|
|
|
service: my-app
|
|
|
|
|
|
|
|
|
|
# Name of the container image.
|
|
|
|
|
image: user/my-app
|
|
|
|
|
image: my-user/my-app
|
|
|
|
|
|
|
|
|
|
# Deploy to these servers.
|
|
|
|
|
servers:
|
|
|
|
|
web:
|
|
|
|
|
- 192.168.0.1
|
|
|
|
|
# job:
|
|
|
|
|
# hosts:
|
|
|
|
|
# - 192.168.0.1
|
|
|
|
|
# cmd: bin/jobs
|
|
|
|
|
|
|
|
|
|
# Enable SSL auto certification via Let's Encrypt (and allow for multiple apps on one server).
|
|
|
|
|
# Set ssl: false if using something like Cloudflare to terminate SSL (but keep host!).
|
|
|
|
|
proxy:
|
|
|
|
|
ssl: true
|
|
|
|
|
host: app.example.com
|
|
|
|
|
|
|
|
|
|
# Credentials for your image host.
|
|
|
|
|
registry:
|
|
|
|
|
@@ -14,7 +25,7 @@ registry:
|
|
|
|
|
# server: registry.digitalocean.com / ghcr.io / ...
|
|
|
|
|
username: my-user
|
|
|
|
|
|
|
|
|
|
# Always use an access token rather than real password when possible.
|
|
|
|
|
# Always use an access token rather than real password (pulled from .kamal/secrets).
|
|
|
|
|
password:
|
|
|
|
|
- KAMAL_REGISTRY_PASSWORD
|
|
|
|
|
|
|
|
|
|
@@ -22,19 +33,44 @@ registry:
|
|
|
|
|
builder:
|
|
|
|
|
arch: amd64
|
|
|
|
|
|
|
|
|
|
# Inject ENV variables into containers (secrets come from .env).
|
|
|
|
|
# Remember to run `kamal env push` after making changes!
|
|
|
|
|
# Inject ENV variables into containers (secrets come from .kamal/secrets).
|
|
|
|
|
#
|
|
|
|
|
# env:
|
|
|
|
|
# clear:
|
|
|
|
|
# DB_HOST: 192.168.0.2
|
|
|
|
|
# secret:
|
|
|
|
|
# - RAILS_MASTER_KEY
|
|
|
|
|
|
|
|
|
|
# Aliases are triggered with "bin/kamal <alias>". You can overwrite arguments on invocation:
|
|
|
|
|
# "bin/kamal logs -r job" will tail logs from the first server in the job section.
|
|
|
|
|
#
|
|
|
|
|
# aliases:
|
|
|
|
|
# shell: app exec --interactive --reuse "bash"
|
|
|
|
|
|
|
|
|
|
# Use a different ssh user than root
|
|
|
|
|
#
|
|
|
|
|
# ssh:
|
|
|
|
|
# user: app
|
|
|
|
|
|
|
|
|
|
# Use accessory services (secrets come from .env).
|
|
|
|
|
# Use a persistent storage volume.
|
|
|
|
|
#
|
|
|
|
|
# volumes:
|
|
|
|
|
# - "app_storage:/app/storage"
|
|
|
|
|
|
|
|
|
|
# Bridge fingerprinted assets, like JS and CSS, between versions to avoid
|
|
|
|
|
# hitting 404 on in-flight requests. Combines all files from new and old
|
|
|
|
|
# version inside the asset_path.
|
|
|
|
|
#
|
|
|
|
|
# asset_path: /app/public/assets
|
|
|
|
|
|
|
|
|
|
# Configure rolling deploys by setting a wait time between batches of restarts.
|
|
|
|
|
#
|
|
|
|
|
# boot:
|
|
|
|
|
# limit: 10 # Can also specify as a percentage of total hosts, such as "25%"
|
|
|
|
|
# wait: 2
|
|
|
|
|
|
|
|
|
|
# Use accessory services (secrets come from .kamal/secrets).
|
|
|
|
|
#
|
|
|
|
|
# accessories:
|
|
|
|
|
# db:
|
|
|
|
|
# image: mysql:8.0
|
|
|
|
|
@@ -56,29 +92,3 @@ builder:
|
|
|
|
|
# port: 6379
|
|
|
|
|
# directories:
|
|
|
|
|
# - data:/data
|
|
|
|
|
|
|
|
|
|
# Bridge fingerprinted assets, like JS and CSS, between versions to avoid
|
|
|
|
|
# hitting 404 on in-flight requests. Combines all files from new and old
|
|
|
|
|
# version inside the asset_path.
|
|
|
|
|
#
|
|
|
|
|
# If your app is using the Sprockets gem, ensure it sets `config.assets.manifest`.
|
|
|
|
|
# See https://github.com/basecamp/kamal/issues/626 for details
|
|
|
|
|
#
|
|
|
|
|
# asset_path: /rails/public/assets
|
|
|
|
|
|
|
|
|
|
# Configure rolling deploys by setting a wait time between batches of restarts.
|
|
|
|
|
# boot:
|
|
|
|
|
# limit: 10 # Can also specify as a percentage of total hosts, such as "25%"
|
|
|
|
|
# wait: 2
|
|
|
|
|
|
|
|
|
|
# Configure the role used to determine the primary_host. This host takes
|
|
|
|
|
# deploy locks, runs health checks during the deploy, and follow logs, etc.
|
|
|
|
|
#
|
|
|
|
|
# Caution: there's no support for role renaming yet, so be careful to cleanup
|
|
|
|
|
# the previous role on the deployed hosts.
|
|
|
|
|
# primary_role: web
|
|
|
|
|
|
|
|
|
|
# Controls if we abort when see a role with no hosts. Disabling this may be
|
|
|
|
|
# useful for more complex deploy configurations.
|
|
|
|
|
#
|
|
|
|
|
# allow_empty_roles: false
|
|
|
|
|
|