If you can have an alias like: ``` aliases: rails: app exec -p rails ``` Then `kamal rails db:migrate:status` will execute `kamal app exec -p rails db:migrate:status`. So this works, we'll allow multiple arguments `app exec` and `server exec` to accept multiple arguments. The arguments are combined by simply joining them with a space. This means that these are equivalent: ``` kamal app exec -p rails db:migrate:status kamal app exec -p "rails db:migrate:status" ``` If you want to pass an argument with spaces, you'll need to quote it: ``` kamal app exec -p "git commit -am \"My comment\"" kamal app exec -p git commit -am "\"My comment\"" ```
44 lines
874 B
YAML
44 lines
874 B
YAML
service: app
|
|
image: app
|
|
servers:
|
|
web:
|
|
hosts:
|
|
- vm1
|
|
- vm2
|
|
workers:
|
|
hosts:
|
|
- vm3
|
|
cmd: sleep infinity
|
|
|
|
asset_path: /usr/share/nginx/html/versions
|
|
|
|
registry:
|
|
server: registry:4443
|
|
username: root
|
|
password: root
|
|
builder:
|
|
multiarch: false
|
|
args:
|
|
COMMIT_SHA: <%= `git rev-parse HEAD` %>
|
|
healthcheck:
|
|
cmd: wget -qO- http://localhost > /dev/null || exit 1
|
|
max_attempts: 3
|
|
traefik:
|
|
args:
|
|
accesslog: true
|
|
accesslog.format: json
|
|
image: registry:4443/traefik:v2.10
|
|
accessories:
|
|
busybox:
|
|
service: custom-busybox
|
|
image: registry:4443/busybox:1.36.0
|
|
cmd: sh -c 'echo "Starting busybox..."; trap exit term; while true; do sleep 1; done'
|
|
roles:
|
|
- web
|
|
stop_wait_time: 1
|
|
readiness_delay: 0
|
|
aliases:
|
|
whome: version
|
|
worker_hostname: app exec -r workers -q --reuse hostname
|
|
uname: server exec -q -p uname
|