Donal McBreen
3c39086613
Not experimental
2024-09-16 16:44:58 +01:00
Donal McBreen
8b965b0a31
Handle polling without the healthcheck config
2024-09-16 16:44:58 +01:00
Donal McBreen
d2672c771e
Remove redundant call to env remove
2024-09-16 16:44:58 +01:00
Donal McBreen
24031fefb0
Remove proxy only if no apps are installed
2024-09-16 16:44:58 +01:00
Donal McBreen
35fe9c154d
Move audits back to run dir so they survive kamal remove
2024-09-16 16:44:58 +01:00
Donal McBreen
b8972a6833
Remove service directory on kamal remove
2024-09-16 16:44:58 +01:00
Donal McBreen
d7d6fa34b0
Use Volume for kamal proxy config volume
2024-09-16 16:44:58 +01:00
Donal McBreen
c21757f747
Move all files on the host under a common directory
...
This will make running kamal remove simpler, we can just clean up that
directory.
2024-09-16 16:44:58 +01:00
Donal McBreen
cb73c730f9
No need for run_id
2024-09-16 16:44:58 +01:00
Donal McBreen
109339189a
Fix up integration app_test.rb
2024-09-16 16:44:58 +01:00
Donal McBreen
33834a266a
Drop sleep after container healthy
2024-09-16 16:44:58 +01:00
Donal McBreen
e1016b2469
No need to wait_for_healthy
2024-09-16 16:44:58 +01:00
Donal McBreen
a40b644145
Check that there's no traefik hooks left behind
2024-09-16 16:44:58 +01:00
Donal McBreen
ccb7424197
Remove stray exit!
2024-09-16 16:44:58 +01:00
Donal McBreen
2125327d54
proxy/host -> proxy/hosts
2024-09-16 16:44:58 +01:00
Donal McBreen
f4d309c5cc
Rip out Traefik
2024-09-16 16:44:55 +01:00
Donal McBreen
5bca8015bc
Map kamal proxy config into .kamal/proxy/config
...
This will allow us to share files with the proxy via the host.
2024-09-16 16:44:41 +01:00
Donal McBreen
27a7b339a6
Drop run_directory configuration option
...
We need to drop to be fixed so multiple applications put the config in
the same place.
2024-09-16 16:44:41 +01:00
Donal McBreen
dcd4778dd9
Port -> app_port
2024-09-16 16:44:41 +01:00
Donal McBreen
6f2eaed398
Work out the host and port for the container
...
Avoid docker inspect:
1. Use the container ID as the host
2. Configure the port, default to 3000
2024-09-16 16:44:41 +01:00
Donal McBreen
e9d480b514
Add the proxy/ssl config and pass on to kamal-proxy
2024-09-16 16:44:41 +01:00
Donal McBreen
2fdc59a3aa
Fix tests
2024-09-16 16:44:41 +01:00
Donal McBreen
b33c999125
Remove envify, make proxy booting work with env files
2024-09-16 16:44:41 +01:00
Donal McBreen
2056351c38
Use kamal network for accessories
2024-09-16 16:44:41 +01:00
Donal McBreen
9c2d5f83f7
Boot latest version when upgrading proxy
2024-09-16 16:44:41 +01:00
Donal McBreen
f347ef7e44
Add proxy upgrade command
2024-09-16 16:44:41 +01:00
Donal McBreen
63ebeda489
Create proxy and app containers in a kamal network
2024-09-16 16:44:41 +01:00
Donal McBreen
13bdf50ceb
Fix tests for proxy defaults and required builder arch
2024-09-16 16:44:41 +01:00
Donal McBreen
bd6558630f
Fix merge error
2024-09-16 16:44:39 +01:00
Donal McBreen
53903ddcd2
Read buffer not buffering
2024-09-16 16:44:21 +01:00
Donal McBreen
55756fa6f3
Set request and response headers
2024-09-16 16:44:21 +01:00
Donal McBreen
fe0c656de5
Split buffer requests/responses
2024-09-16 16:44:21 +01:00
Donal McBreen
418d8045d8
Add forward headers support
2024-09-16 16:44:21 +01:00
Donal McBreen
d63ff8f251
Set extra fields
2024-09-16 16:44:21 +01:00
Donal McBreen
eab717e0cf
Add kamal-proxy in experimental mode
...
The proxy can be enabled via the config:
```
proxy:
enabled: true
hosts:
- 10.0.0.1
- 10.0.0.2
```
This will enable the proxy and cause it to be run on the hosts listed
under `hosts`, after running `kamal proxy reboot`.
Enabling the proxy disables `kamal traefik` commands and replaces them
with `kamal proxy` ones. However only the marked hosts will run the
kamal-proxy container, the rest will run Traefik as before.
2024-09-16 16:44:19 +01:00
Donal McBreen
66d5e25834
Merge pull request #939 from basecamp/secrets-mutex
...
Add a mutex around loading secrets
2024-09-16 16:26:58 +01:00
Donal McBreen
6bbbd81da1
Add a mutex around loading secrets
...
Loading secrets may ask for use input, so we need to ensure only one
thread does it at a time.
2024-09-16 14:44:39 +01:00
Donal McBreen
876eebc7c5
Merge pull request #936 from basecamp/asset-extraction-entrypoint
...
Override the entrypoint when extracting assets
2024-09-13 17:46:43 +01:00
Donal McBreen
dc1bbac3c8
Override the entrypoint when extracting assets
...
When overriding the command, docker will still run the entrypoint. We
want to avoid that here - we just want to get the assets out as quickly
as possible. Otherwise maybe something important is going on when we
stop the container.
2024-09-12 19:31:18 +01:00
Donal McBreen
045aa7d167
Merge pull request #934 from basecamp/secrets-dont-exit
...
Don't exit from failed secrets commands
2024-09-11 16:27:33 +01:00
Donal McBreen
0660895e75
Don't exit from failed secrets commands
...
We can let the exception bubble up. We'll still get an error message and
it ensures that any cleanup we need is done (i.e. releasing deploy locks).
2024-09-11 16:10:52 +01:00
Donal McBreen
debdf00cca
Merge pull request #933 from basecamp/common-secrets
...
Add secrets-common for shared secrets
2024-09-11 14:20:01 +01:00
Donal McBreen
9089c41f30
Add secrets-common for shared secrets
...
Add a shared secrets file used across all destinations. Useful for
things Github tokens or registry passwords.
The secrets are added to a new file called `secrets-common` to highlight
they are shared, and to avoid acciedentally inheriting a secret from the
`secrets` file to `secrets.destination`.
2024-09-11 13:41:36 +01:00
Donal McBreen
c9946808b1
Merge pull request #931 from basecamp/dont-git-ignore-dot-kamal-secrets
...
Don't git ignore .kamal/secrets
2024-09-11 13:26:07 +01:00
Donal McBreen
deb2a6d298
Merge pull request #930 from basecamp/hide-1password-login-error
...
Hide the 1password login error
2024-09-11 12:18:09 +01:00
Donal McBreen
0cb69a84f5
Don't git ignore .kamal/secrets
...
Secrets should be interpolated at runtime so we do want the file in git.
But add a warning at the top to avoid adding secrets or git ignore the
file if you do.
Also provide examples of the three options for interpolating secrets.
2024-09-11 12:16:18 +01:00
Donal McBreen
aa630f156a
Hide the 1password login error
...
Avoid outputting this login error message, it wasn't an error and you
don't need to follow those instructions.
```
[ERROR] 2024/09/11 11:57:08 You are not currently signed in. Please run `op signin --help` for instructions
```
2024-09-11 12:02:53 +01:00
Donal McBreen
63d0b5ddfa
Merge pull request #928 from basecamp/kamal-secrets-inline-aware
...
Make the secrets commands inline aware
2024-09-10 11:08:10 +01:00
Donal McBreen
06f4caa866
Make the secrets commands inline aware
...
Rather than redirecting the global $stdout, which is not never clever in
a threaded program, we'll make the secrets commands aware they are
being inlined, so they return the value instead of printing it.
Additionally we no longer need to interrupt the parent process on error
as we've inlined the command - exit 1 is enough.
2024-09-10 10:39:44 +01:00
Donal McBreen
5aa3d1aeb0
Merge pull request #927 from basecamp/revert-903-integration-test-insecure-registry
...
Revert "Integration test insecure registry"
2024-09-10 10:12:57 +01:00