Current section

Files

Jump to
phx_new templates phx_umbrella config runtime.exs.eex
Raw

templates/phx_umbrella/config/runtime.exs.eex

import Config
# config/runtime.exs is executed for all environments, including
# during releases. It is executed after compilation and before the
# system starts, so it is typically used to load production configuration
# and secrets from environment variables or elsewhere. Do not define
# any compile-time configuration in here, as it won't be applied.
# The block below contains prod specific runtime configuration.
config :<%= @web_app_name %>, <%= @endpoint_module %>,
http: [port: String.to_integer(System.get_env("PORT", "4000"))]
<%= if @html do %>
if config_env() == :dev do
# Reload browser tabs when matching files change.
config :<%= @web_app_name %>, <%= @endpoint_module %>,
live_reload: [
web_console_logger: true,
patterns: [
# Static assets, except user uploads
~r"priv/static/(?!uploads/).*\.(js|css|png|jpeg|jpg|gif|svg)$"<%= @config_regex_E %>,<%= if @gettext do %>
# Gettext translations
~r"priv/gettext/.*\.po$"<%= @config_regex_E %>,<% end %>
# Router, Controllers, LiveViews and LiveComponents
~r"lib/<%= @web_app_name %>/router\.ex$"<%= @config_regex_E %>,
~r"lib/<%= @web_app_name %>/(controllers|live|components)/.*\.(ex|heex)$"<%= @config_regex_E %>
]
]
end
<% end %>
if config_env() == :prod do
config :<%= @app_name %>, :dns_cluster_query, System.get_env("DNS_CLUSTER_QUERY")
end