-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow importing extra config #3906
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,8 +19,10 @@ defmodule Plausible.MixProject do | |
releases: [ | ||
plausible: [ | ||
include_executables_for: [:unix], | ||
applications: [plausible: :permanent], | ||
steps: [:assemble, :tar] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We are copying all rel/ files directly, the tar archive ends up being unused. |
||
config_providers: [ | ||
{Config.Reader, | ||
path: {:system, "RELEASE_ROOT", "/import_extra_config.exs"}, imports: []} | ||
] | ||
] | ||
], | ||
dialyzer: [ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import Config | ||
import Plausible.ConfigHelpers | ||
|
||
config_dir = System.get_env("CONFIG_DIR", "/run/secrets") | ||
|
||
if extra_config_path = get_var_from_path_or_env(config_dir, "EXTRA_CONIFG_PATH") do | ||
import_config extra_config_path | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This intermediate config file is needed as There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From https://hexdocs.pm/mix/Mix.Tasks.Release.html#module-runtime-configuration
|
||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is part of the default applications