Configure mix release, add release runtime configuration
This commit is contained in:
parent
4f9e165d9b
commit
e61b409838
3 changed files with 14 additions and 11 deletions
|
@ -49,7 +49,3 @@ config :logger, level: :info
|
||||||
# force_ssl: [hsts: true]
|
# force_ssl: [hsts: true]
|
||||||
#
|
#
|
||||||
# Check `Plug.SSL` for all available options in `force_ssl`.
|
# Check `Plug.SSL` for all available options in `force_ssl`.
|
||||||
|
|
||||||
# Finally import the config/prod.secret.exs which loads secrets
|
|
||||||
# and configuration from environment variables.
|
|
||||||
import_config "prod.secret.exs"
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
# In this file, we load production configuration and secrets
|
import Config
|
||||||
# from environment variables. You can also hardcode secrets,
|
|
||||||
# although such is generally not recommended and you have to
|
# Runtime configuration - executed early in the boot process (both for releases
|
||||||
# remember to add this file to your .gitignore.
|
# and for Mix).
|
||||||
use Mix.Config
|
|
||||||
|
|
||||||
database_url =
|
database_url =
|
||||||
System.get_env("DATABASE_URL") ||
|
System.get_env("DATABASE_URL") ||
|
||||||
|
@ -35,7 +34,7 @@ config :recycledcloud, RecycledCloudWeb.Endpoint,
|
||||||
# If you are doing OTP releases, you need to instruct Phoenix
|
# If you are doing OTP releases, you need to instruct Phoenix
|
||||||
# to start each relevant endpoint:
|
# to start each relevant endpoint:
|
||||||
#
|
#
|
||||||
# config :recycledcloud, RecycledCloudWeb.Endpoint, server: true
|
config :recycledcloud, RecycledCloudWeb.Endpoint, server: true
|
||||||
#
|
#
|
||||||
# Then you can assemble a release by calling `mix release`.
|
# Then you can assemble a release by calling `mix release`.
|
||||||
# See `mix help release` for more information.
|
# See `mix help release` for more information.
|
10
mix.exs
10
mix.exs
|
@ -10,7 +10,15 @@ defmodule RecycledCloud.MixProject do
|
||||||
compilers: [:phoenix, :gettext] ++ Mix.compilers(),
|
compilers: [:phoenix, :gettext] ++ Mix.compilers(),
|
||||||
start_permanent: Mix.env() == :prod,
|
start_permanent: Mix.env() == :prod,
|
||||||
aliases: aliases(),
|
aliases: aliases(),
|
||||||
deps: deps()
|
deps: deps(),
|
||||||
|
releases: [
|
||||||
|
recycledcloud: [
|
||||||
|
include_executables_for: [:unix],
|
||||||
|
applications: [runtime_tools: :permanent],
|
||||||
|
include_erts: true,
|
||||||
|
runtime_config_path: "config/release-runtime.exs"
|
||||||
|
]
|
||||||
|
]
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue