Donal McBreen
7b55f4734e
Envify already env pushes
...
`kamal envify` will do `kamal env push` for us, so no need to call it
ourselves during setup.
2024-05-21 11:47:51 +01:00
Donal McBreen
9700e2b3c4
Merge pull request #646 from nickhammond/server/exec
...
Add in a server exec command for running ad-hoc commands directly on the server
2024-05-21 11:34:20 +01:00
Donal McBreen
060e5d2027
Update lib/kamal/cli/server.rb
...
Co-authored-by: Sijawusz Pur Rahnama <sija@sija.pl >
2024-05-21 08:22:20 +01:00
Nick Hammond
8a4f7163bb
Apply suggestions from code review
...
Co-authored-by: Donal McBreen <dmcbreen@gmail.com >
2024-05-20 11:15:14 -07:00
Donal McBreen
990f1b4413
Merge pull request #798 from basecamp/git-clone
...
Build from within a git clone by default
2024-05-20 12:18:07 +01:00
Donal McBreen
da9428f64d
Merge pull request #813 from basecamp/handle-no-env-tags
...
Don't blow up if there are no env tags
2024-05-20 10:58:11 +01:00
Donal McBreen
17dcaccb6a
Don't blow up if there are no env tags
2024-05-20 10:50:07 +01:00
Donal McBreen
448349d0e5
Merge pull request #812 from basecamp/sshkit-1.22.2-minimum
...
Set sshkit minimum version to 1.22.2
2024-05-20 10:39:17 +01:00
Donal McBreen
b6dba57c7d
Set sshkit minimum version to 1.22.2
...
This includes a fix for a bug in the eviction thread that could cause
this error:
```
[ERROR (IOError): Exception while executing on host foo: closed stream]
```
See https://github.com/capistrano/sshkit/pull/534
2024-05-20 10:06:53 +01:00
Donal McBreen
0ea2a2c509
Don't include destination in clone directory
...
Reusing the clone directory should allow caching of the build context
between deployments to different destinations.
2024-05-20 09:34:42 +01:00
Donal McBreen
307750ff70
Build from within a git clone by default
...
Docker does not respect the .dockerignore file when building from a tar.
Instead by default we'll make a local clone into a tmp directory and
build from there. Subsequent builds will reset the clone to match the
checkout.
Compared to building directly in the repo, we'll have reproducible
builds.
Compared to using a git archive:
1. .dockerignore is respected
2. We'll have faster builds - docker can be smarter about caching the
build context on subsequent builds from a directory
To build from the repo directly, set the build context to "." in the
config.
If there are uncommitted changes, we'll warn about them either being
included or ignored depending on whether we build from the clone.
2024-05-20 09:30:56 +01:00
Donal McBreen
88947b6a7b
Merge pull request #805 from basecamp/env-under-tags
...
Move env_tags under env key
2024-05-15 11:09:47 +01:00
Donal McBreen
f48c227768
Move env_tags under env key
...
Instead of:
```
env:
CLEAR_TAG: untagged
env_tags:
tag1:
CLEAR_TAG: tagged
```
We'll have:
```
env:
clear:
CLEAR_TAG: untagged
tags:
tag1:
CLEAR_TAG: tagged
```
2024-05-15 10:19:22 +01:00
David Heinemeier Hansson
f98380ef0c
Merge pull request #802 from basecamp/envify-during-setup
...
Envify during setup
2024-05-14 16:00:28 -07:00
David Heinemeier Hansson
0bc27c10cc
Fix tests
2024-05-14 11:59:42 -07:00
David Heinemeier Hansson
e58d2f67f2
Fix env template path check and tests
2024-05-14 10:07:31 -07:00
David Heinemeier Hansson
938ac375a1
Only envify if there is a template file available
2024-05-13 17:08:53 -07:00
David Heinemeier Hansson
dc1f707a56
Fix test
2024-05-13 17:01:50 -07:00
David Heinemeier Hansson
033f2a3401
Correct invocation
2024-05-13 16:59:50 -07:00
David Heinemeier Hansson
7cac7e6fb0
Envify during setup
2024-05-13 15:18:11 -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
Donal McBreen
12cad5458a
Merge pull request #762 from kryachkov/main
...
Trim long hostnames
2024-05-10 16:05:27 +01:00
Donal McBreen
f8b7f74543
Merge pull request #786 from hundredwatt/add-target-option-to-builder
...
Add --target option to Builder to support multi-stage Docker builds
2024-05-10 15:15:31 +01:00
Donal McBreen
489d6dbcbb
Merge pull request #789 from basecamp/host-tags
...
Host specific env with tags
2024-05-10 08:08:29 +01:00
Donal McBreen
6d062ce271
Host specific env with tags
...
Allow hosts to be tagged so we can have host specific env variables.
We might want host specific env variables for things like datacenter
specific tags or testing GC settings on a specific host.
Right now you either need to set up a separate role, or have the app
be host aware.
Now you can define tag env variables and assign those to hosts.
For example:
```
servers:
- 1.1.1.1
- 1.1.1.2: tag1
- 1.1.1.2: tag2
- 1.1.1.3: [ tag1, tag2 ]
env_tags:
tag1:
ENV1: value1
tag2:
ENV2: value2
```
The tag env supports the full env format, allowing you to set secret and
clear values.
2024-05-09 16:02:45 +01:00
Jason Nochlin
1e44cc2597
fix rubocop violation
2024-05-08 19:22:25 -06:00
André Falk
63c47eca4c
Trim long hostnames
...
Hostnames longer than 64 characters are not supported by docker
2024-05-07 19:06:39 +02:00
Donal McBreen
3c8428504d
Bump version for 1.5.2
v1.5.2
2024-05-07 09:44:11 +01:00
Donal McBreen
8e71c48747
Merge pull request #759 from basecamp/details-accessory-host
...
Output the host when running accessory details
2024-05-02 15:54:08 +01:00
Donal McBreen
67a86e1068
Merge pull request #790 from basecamp/warn-on-missing-builder
...
Warn on missing builder
2024-05-02 12:50:00 +01:00
Donal McBreen
b67f40bdf7
Warn on missing builder
...
We are going to try to create a builder if one is missing, so let's warn
rather than report it as an error.
2024-05-02 12:38:20 +01:00
Donal McBreen
375f0283c4
Merge pull request #785 from basecamp/filter-traefik-hosts
...
Apply --hosts and --roles filters to traefik hosts as well
2024-04-29 14:48:23 +01:00
Jason Nochlin
947be0877f
add --target option for builder configuration
2024-04-27 10:24:47 -06:00
Matthew Kent
b8aaddb4c9
Apply --hosts and --roles filters to traefik hosts as well.
2024-04-26 17:08:57 -07:00
Donal McBreen
f48f528043
Bump version for 1.5.1
v1.5.1
2024-04-26 14:26:02 +01:00
Donal McBreen
ec0a082542
Merge pull request #779 from basecamp/fix-log-following
...
Escape single quotes to fix log following
2024-04-26 14:25:27 +01:00
Donal McBreen
6c638a8a77
Merge pull request #778 from basecamp/glob-match-roles-and-hosts
...
Allow glob matches for roles and hosts
2024-04-26 14:20:17 +01:00
Donal McBreen
1f5b936fa2
Escape single quotes to fix log following
...
Fixes: https://github.com/basecamp/kamal/issues/777
2024-04-26 14:16:19 +01:00
Donal McBreen
f785451cc7
Allow glob matches for roles and hosts
...
This lets you do things like:
```
kamal details -h '1.1.1.[1-9]'
kamal details -r 'w{eb,orkers}'
```
2024-04-26 13:43:52 +01:00
Donal McBreen
d475e88dbe
Bump version for 1.5.0
v1.5.0
2024-04-25 13:39:06 +01:00
Donal McBreen
d551f044d6
Merge pull request #772 from aishek/take-accessory-hosts-into-account
...
Take accessory hosts into account for --hosts
2024-04-25 11:57:45 +01:00
Donal McBreen
2611179d5e
Merge pull request #773 from xiaohui-zhangxh/docker-env-file-keep-non-ascii
...
don't escape non-ascii characters in docker env file
2024-04-25 11:57:14 +01:00
Donal McBreen
1a013b8d4b
Merge pull request #770 from ttilberg/769-ensure-valid-service-name-with-capital-letters
...
Allow capital letters to match valid service name, such as in MyApp
2024-04-25 11:52:55 +01:00
xiaohui
9a9a0914cd
don't escape non-ascii characters in docker env file
2024-04-17 17:42:06 +08:00
Alexandr Borisov
12c518097f
Take accessory hosts into account
2024-04-17 11:45:33 +03:00
Tim Tilberg
69f90387a8
Allow capital letters to match valid service name, such as in MyApp
2024-04-15 09:09:58 -05:00
Donal McBreen
e6d436f646
Output the host when running accessory details
...
We already do this for app and Traefik hosts.
2024-04-05 12:46:51 +01:00
Donal McBreen
31669d4dce
Merge pull request #758 from basecamp/any-runtime-in-test
...
Accept any runtime in the hook tests
2024-04-03 16:27:59 +01:00
Donal McBreen
9d20c1466e
Merge pull request #757 from basecamp/executable-sample-docker-setup-hook
...
Make the sample docker setup hook executable
2024-04-03 16:12:46 +01:00
Donal McBreen
ff1dabe7f8
Merge pull request #756 from basecamp/tidy-up-role-host-setup
...
Tidy up role and host commander setup
2024-04-03 16:09:12 +01:00