Donal McBreen
85f62ebc22
Map kamal proxy config into .kamal/proxy/config
...
This will allow us to share files with the proxy via the host.
2024-09-11 14:46:56 +01:00
Donal McBreen
e0df051756
Drop run_directory configuration option
...
We need to drop to be fixed so multiple applications put the config in
the same place.
2024-09-11 14:30:14 +01:00
Donal McBreen
0b22fea8a9
Port -> app_port
2024-09-11 14:23:52 +01:00
Donal McBreen
f088e0cb64
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-11 14:20:18 +01:00
Donal McBreen
9b673c2114
Add the proxy/ssl config and pass on to kamal-proxy
2024-09-11 14:20:18 +01:00
Donal McBreen
e0d336dc11
Fix tests
2024-09-11 14:20:18 +01:00
Donal McBreen
1422ecaeb8
Remove envify, make proxy booting work with env files
2024-09-11 14:20:18 +01:00
Donal McBreen
f8de2898c9
Use kamal network for accessories
2024-09-11 14:20:18 +01:00
Donal McBreen
0cd1a4fb07
Boot latest version when upgrading proxy
2024-09-11 14:20:18 +01:00
Donal McBreen
4381f3bc5f
Add proxy upgrade command
2024-09-11 14:20:18 +01:00
Donal McBreen
35de0891c0
Create proxy and app containers in a kamal network
2024-09-11 14:20:18 +01:00
Donal McBreen
fb9c8f16f1
Fix tests for proxy defaults and required builder arch
2024-09-11 14:20:18 +01:00
Donal McBreen
d92b3628f4
Fix merge error
2024-09-11 14:20:18 +01:00
Donal McBreen
4732543eca
Read buffer not buffering
2024-09-11 14:20:18 +01:00
Donal McBreen
e58d33b389
Set request and response headers
2024-09-11 14:20:18 +01:00
Donal McBreen
97b842fcee
Split buffer requests/responses
2024-09-11 14:20:18 +01:00
Donal McBreen
98eb38f11c
Add forward headers support
2024-09-11 14:20:18 +01:00
Donal McBreen
805fc1554e
Set extra fields
2024-09-11 14:20:18 +01:00
Donal McBreen
61715e0a4b
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-11 14:20:18 +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
Donal McBreen
a4d668cd39
Revert "Integration test insecure registry"
2024-09-10 10:02:10 +01:00
Donal McBreen
7156c80f34
Merge pull request #924 from basecamp/secrets
...
Secrets
2024-09-09 15:13:35 +01:00
Donal McBreen
aed2ef99d0
Use env files for secrets
...
Add env files back in for secrets - hides them from process lists and
allows you to pick up the latest env file when running
`kamal app exec` without reusing.
2024-09-09 14:43:12 +01:00
Donal McBreen
57cbf7cdb5
Inline dotenv kamal secrets calls
2024-09-06 16:56:54 +01:00
Donal McBreen
b99c044327
Update lib/kamal/cli/templates/secrets
...
Co-authored-by: Sijawusz Pur Rahnama <sija@sija.pl >
2024-09-06 13:25:39 +01:00
Donal McBreen
8ad6a0ed16
Add .kamal/secrets on kamal init
2024-09-06 11:54:12 +01:00
Donal McBreen
8b62e2694a
Test non-ascii secret interpolation
2024-09-05 10:01:56 +01:00
Donal McBreen
be1df4356a
fetch_from_vault -> fetch_secrets
2024-09-05 09:53:33 +01:00
Donal McBreen
8210e8e768
Drop redundant rescue
2024-09-05 09:53:18 +01:00
Donal McBreen
9b96ef2412
Shellescape command input
2024-09-05 08:37:50 +01:00
Donal McBreen
1522d94ac9
Pass secrets to pre/post deploy hooks
2024-09-04 16:24:10 +01:00
Donal McBreen
a68294c384
Remote test adapter from test_helper.rb
2024-09-04 12:57:25 +01:00
Donal McBreen
31a347c285
Move int parent comment
2024-09-04 12:52:30 +01:00
Donal McBreen
3d502ab12d
Add test adapter and interpolate secrets in integration tests
2024-09-04 12:40:27 +01:00
Donal McBreen
5226d52f8a
Interrupting parent on error
2024-09-04 12:14:47 +01:00
Donal McBreen
9deb8af4a0
Don't hide command
2024-09-04 09:32:45 +01:00
Donal McBreen
068aaa0bd0
Fix options
2024-09-04 09:32:45 +01:00
Donal McBreen
a726a86a17
Add lastpass, bitwarden adapters
2024-09-04 09:32:45 +01:00
Donal McBreen
b2e1a4d4c1
Secrets test
2024-09-04 09:32:45 +01:00
Donal McBreen
9ade79fc84
OnePassword, LastPass + Bitwarden adapters
2024-09-04 09:32:45 +01:00
Donal McBreen
79731da619
Single fetch command
2024-09-04 09:32:45 +01:00
Donal McBreen
0ae8046905
Add secret tests
2024-09-04 09:32:45 +01:00