Nick Hammond
8a4f7163bb
Apply suggestions from code review
...
Co-authored-by: Donal McBreen <dmcbreen@gmail.com >
2024-05-20 11:15:14 -07:00
Nick Hammond
fb58fc0ba6
Add in a server exec command for running ad-hoc commands directly on the server
2024-05-13 14:17:06 -07:00
dhh
5a09aa12ba
Allow local builds using a different arch than native
2024-01-10 13:00:48 -08:00
Donal McBreen
aca7796e9d
Bump version for 1.3.1
2024-01-10 08:56:34 +00:00
Matthew Kent
c5ae54d7d4
Add a missing base64 require.
...
Also, prepare for the moving of base64 from default to a bundled gem in ruby 3.4.
2024-01-09 08:21:10 -08:00
Matthew Kent
7fa53d90bd
Merge hashes to de-dupe the app and role envs.
...
This is better then adding them together which confusingly results in
both ENV vars in the same file, though based on the load order, they
worked anyway.
2023-11-28 15:59:03 -08:00
Donal McBreen
a155b7baab
Bump version for 1.3.0
2023-11-28 14:06:45 +00:00
Donal McBreen
175e3bc159
Merge pull request #507 from leonvogt/introduce-absolute-accessories-paths
...
Add option to set an absolute directory path
2023-11-28 10:15:27 +00:00
Matthew Kent
63babecba7
Raise an error when either the filtered hosts or roles are empty.
...
Keeps us confusingly running things on the primary_host when nothing
matches.
2023-11-25 12:47:39 -08:00
Matthew Kent
79baa598fa
Make an effort to match the primary_role from a list of specific roles.
...
This is less surprising than picking the first role and first host.
2023-11-24 17:41:58 -08:00
Donal McBreen
635876bdb9
Merge pull request #523 from rmacklin/fix-error-message-in-pre-build-sample-hook
...
Fix duplicate error message in pre-build.sample
2023-11-16 08:51:22 +00:00
Donal McBreen
11521517fa
Merge pull request #550 from dmitrytrager/feature-name-all-for-accessory-reboot
...
feature: add NAME=all option for accessory reboot
2023-11-16 08:50:51 +00:00
Donal McBreen
610d9de3fd
Merge pull request #580 from happyscribe/feat/no-web
...
Allow Kamal to run without traefik
2023-11-16 08:44:45 +00:00
Donal McBreen
bf79df0f72
Bump version for 1.2.0
2023-11-15 14:48:11 +00:00
Donal McBreen
a0959b5afd
Merge pull request #573 from basecamp/pre-post-traefik-reboot-hooks
...
Pre and post Traefik reboot hooks
2023-11-15 14:01:40 +00:00
Yoel Cabo
7472e5dfa6
Merge remote-tracking branch 'origin/main' into feat/no-web
2023-11-14 12:11:18 +01:00
Yoel Cabo
887b7dd46d
Do not invoke healthcheck on deploy when no web role
2023-11-14 11:34:32 +01:00
Matthew Kent
efcb855db7
Advertise wildcard support.
2023-11-13 23:43:26 -08:00
Matthew Kent
7137850354
Add support for wildcard matches with '*' on roles and hosts.
...
eg:
--roles=*_chicago,*_tokyo
--hosts=app-*
Useful for targeted deploys.
2023-11-13 23:43:23 -08:00
Donal McBreen
8a85840a47
Merge pull request #582 from basecamp/allow-empty-roles
...
Add allow_empty_roles to control aborting on roles with no hosts.
2023-11-13 09:30:01 +00:00
Donal McBreen
80cc0c23d8
Merge pull request #578 from basecamp/enable-yaml-aliases
...
Enable yaml aliases
2023-11-13 09:28:40 +00:00
Matthew Kent
60187cc3a4
Add allow_empty_roles to control aborting on roles with no hosts.
...
This added flexibility allows you to define base roles that might not
necessarily exist in each deploy destination.
2023-11-12 08:54:28 -08:00
Yoel Cabo
87cb8c1f71
fix: allow configurations without web roles
2023-11-12 09:39:07 +01:00
Matthew Kent
263b4a4fb8
Enable aliases for more exotic templating situations.
...
This is super useful for DRY when configuring a number of roles and you
hit the limits of what's reasonable with ERB.
2023-11-11 17:25:50 -08:00
Matthew Kent
a9cc7c73d2
Handle an undefined primary_web_role.
2023-11-11 12:57:31 -08:00
Matthew Kent
628a47ad88
Background for the new option.
2023-11-10 16:39:06 -08:00
Matthew Kent
47f8725cf3
Support a dynamic primary_web_role instead of assuming it's 'web'.
...
This allows for more meaningful naming in roles.
The only caution here is that we don't support the renaming of roles, so
any migration is left to the user.
2023-11-10 16:35:25 -08:00
Donal McBreen
5fd4a28bf7
Pre and post Traefik reboot hooks
...
Provide pre and post reboot hooks for Traefik, that can be used to
remove/add to an external load balancer to prevent requests from being
sent during the reboot.
Works best with the --rolling setting, where each hook is called once
per host.
2023-11-08 15:11:26 +00:00
Donal McBreen
97ba6b746b
Merge pull request #564 from basecamp/return-502-if-no-container
...
Return a 502 when container is down
2023-11-08 14:58:22 +00:00
Donal McBreen
9e25d8a012
Priority 2 for the main app
2023-11-08 14:12:45 +00:00
Leon
f339626667
Add option to set absolute directory path
2023-11-03 22:48:30 +01:00
Leon
2d86d4f7cc
Add SSH port to run_over_ssh
2023-11-03 22:32:37 +01:00
Leon
792aa1dbdf
Add SSH port option
2023-11-03 22:32:37 +01:00
Donal McBreen
24a2f51641
Return a 502 when container is down
...
If the app container is down or not responding then traefik will return
a 404 response code. This is not ideal as it suggests a client rather
than a server problem.
To fix this, we'll define a catch all route that always returns a 502.
This is not ideal as this route would take priority over a shorter route
with priorty 1.
TODO: up the priority of the app route.
2023-11-03 14:20:52 +00:00
Donal McBreen
8f53104d00
Bump version for 1.1.0
2023-11-01 09:20:45 +00:00
dmitrytrager
2d22143a24
feature: add NAME=all option for accessory reboot
2023-10-31 00:13:45 +01:00
Donal McBreen
dd748fac8c
Reset the env before pushing
...
Calling `load_envs` again does not load updated env variables, because
Dotenv does not overwrite existing values.
To fix this we'll store the original ENV and reset to it before
reloading.
https://github.com/basecamp/kamal/issues/512
2023-10-30 11:31:50 +00:00
Donal McBreen
b732b2dd55
Merge pull request #547 from nickhammond/envify/trim-lines
...
Enable trim mode with ERB
2023-10-30 08:57:55 +00:00
Donal McBreen
e3254b2aa8
Merge pull request #544 from nickhammond/bugfix-require-sshkit-sensitive-util
...
Require sshkit within the sshkit util
2023-10-30 08:57:08 +00:00
Donal McBreen
e9269d2ee8
Merge pull request #501 from rience/optional-envify-push
...
Optionally Skip Push for "envify"
2023-10-30 08:30:21 +00:00
Donal McBreen
d2214b43b7
Merge pull request #499 from basecamp/env-only-needed-for-push
...
Remove the env check
2023-10-30 08:22:56 +00:00
Donal McBreen
370481921e
Merge pull request #498 from basecamp/app-exec-env-file
...
App exec with env file
2023-10-30 08:22:35 +00:00
Donal McBreen
aa23f26330
Merge pull request #479 from npezza93/main
...
Loosen superuser check to match docker-installs script check
2023-10-30 08:21:30 +00:00
Donal McBreen
f4933d83bf
Merge pull request #477 from clintmiller/patch-1
...
Pass KAMAL_VERSION env var to container run
2023-10-30 08:19:20 +00:00
Nick Hammond
6c36c82153
Enable trim mode with ERB
2023-10-24 17:09:05 -07:00
Krzysztof Adamski
8ca04032a1
Optionally Skip Push for "envify"
2023-10-23 14:49:39 +02:00
Nick Hammond
2fb22c934b
Require sshkit within the sshkit util
2023-10-22 22:34:22 -07:00
Richard Macklin
f96d071222
Fix copy-pasted error message in pre-build.sample
...
The "No git remote set" error message was appropriate for the previous
block (where it was presumably copy-pasted from), but in this line we
have failed the check that determines if we have a git branch checked
out, so we should output a corresponding error.
2023-10-08 15:14:40 -07:00
Donal McBreen
f6662c7a8f
Remove the env check
...
The env check is not needded anymore as all the commands rely on the
env files having already been created remotely.
The only place the env is needed is when running `kamal env push` and
that will still raise an apropriate error.
2023-09-25 15:23:01 +01:00
Donal McBreen
645f5ab72d
App exec with env file
...
When calling `kamal app exec` for new non interactive containers, run
the command per role on each server and include the role config
including the environment.
Fixes: https://github.com/basecamp/kamal/issues/492
2023-09-25 15:07:05 +01:00