Remove envify, make proxy booting work with env files
This commit is contained in:
@@ -11,7 +11,13 @@ class Kamal::Cli::Proxy < Kamal::Cli::Base
|
|||||||
|
|
||||||
on(KAMAL.traefik_hosts) do |host|
|
on(KAMAL.traefik_hosts) do |host|
|
||||||
execute *KAMAL.registry.login
|
execute *KAMAL.registry.login
|
||||||
execute *KAMAL.traefik_or_proxy(host).start_or_run
|
if KAMAL.proxy_host?(host)
|
||||||
|
execute *KAMAL.proxy.start_or_run
|
||||||
|
else
|
||||||
|
execute *KAMAL.traefik.ensure_env_directory
|
||||||
|
upload! KAMAL.traefik.secrets_io, KAMAL.traefik.secrets_path, mode: "0600"
|
||||||
|
execute *KAMAL.traefik.start_or_run
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ module Kamal::Commands::App::Execution
|
|||||||
docker :run,
|
docker :run,
|
||||||
("-it" if interactive),
|
("-it" if interactive),
|
||||||
"--rm",
|
"--rm",
|
||||||
"--network", "kamal",
|
|
||||||
*role&.env_args(host),
|
*role&.env_args(host),
|
||||||
*argumentize("--env", env),
|
*argumentize("--env", env),
|
||||||
*config.volume_args,
|
*config.volume_args,
|
||||||
|
|||||||
@@ -24,14 +24,12 @@ env:
|
|||||||
# KAMAL_REGISTRY_PASSWORD=pw
|
# KAMAL_REGISTRY_PASSWORD=pw
|
||||||
# DB_PASSWORD=secret123
|
# DB_PASSWORD=secret123
|
||||||
# ```
|
# ```
|
||||||
# See https://kamal-deploy.org/docs/commands/envify/ for how to use generated .env files.
|
|
||||||
#
|
#
|
||||||
# To pass the secrets you should list them under the `secret` key. When you do this the
|
# To pass the secrets you should list them under the `secret` key. When you do this the
|
||||||
# other variables need to be moved under the `clear` key.
|
# other variables need to be moved under the `clear` key.
|
||||||
#
|
#
|
||||||
# Unlike clear values, secrets are not passed directly to the container,
|
# Unlike clear values, secrets are not passed directly to the container,
|
||||||
# but are stored in an env file on the host
|
# but are stored in an env file on the host
|
||||||
# The file is not updated when deploying, only when running `kamal envify` or `kamal env push`.
|
|
||||||
env:
|
env:
|
||||||
clear:
|
clear:
|
||||||
DB_USER: app
|
DB_USER: app
|
||||||
|
|||||||
@@ -76,7 +76,6 @@ class MainTest < IntegrationTest
|
|||||||
test "aliases" do
|
test "aliases" do
|
||||||
@app = "app_with_roles"
|
@app = "app_with_roles"
|
||||||
|
|
||||||
kamal :envify
|
|
||||||
kamal :deploy
|
kamal :deploy
|
||||||
|
|
||||||
output = kamal :whome, capture: true
|
output = kamal :whome, capture: true
|
||||||
|
|||||||
@@ -6,8 +6,6 @@ class ProxyTest < IntegrationTest
|
|||||||
end
|
end
|
||||||
|
|
||||||
test "boot, reboot, stop, start, restart, logs, remove" do
|
test "boot, reboot, stop, start, restart, logs, remove" do
|
||||||
kamal :envify
|
|
||||||
|
|
||||||
kamal :proxy, :boot
|
kamal :proxy, :boot
|
||||||
assert_proxy_running
|
assert_proxy_running
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user