update migrations
All checks were successful
Build and Publish / build-release (push) Successful in 1m37s
All checks were successful
Build and Publish / build-release (push) Successful in 1m37s
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
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.
|
||||
|
||||
logger_level =
|
||||
case System.get_env("LOG_LEVEL", "info") do
|
||||
"debug" -> :debug
|
||||
@@ -29,6 +36,15 @@ config :ex_aws, :s3,
|
||||
|
||||
config :provider_service, :s3_bucket, System.get_env("S3_BUCKET", "provider-service")
|
||||
|
||||
# ## Using releases
|
||||
#
|
||||
# If you use `mix release`, you need to explicitly enable the server
|
||||
# by passing the PHX_SERVER=true when you start it:
|
||||
#
|
||||
# PHX_SERVER=true bin/provider_service start
|
||||
#
|
||||
# Alternatively, you can use `mix phx.gen.release` to generate a `bin/server`
|
||||
# script that automatically sets the env var above.
|
||||
if System.get_env("PHX_SERVER") do
|
||||
config :provider_service, ProviderServiceWeb.Endpoint, server: true
|
||||
end
|
||||
@@ -37,9 +53,6 @@ if cookie = System.get_env("RELEASE_COOKIE") do
|
||||
config :elixir, :cookie, cookie
|
||||
end
|
||||
|
||||
config :provider_service, ProviderServiceWeb.Endpoint,
|
||||
http: [port: String.to_integer(System.get_env("PORT", "8080"))]
|
||||
|
||||
if config_env() == :prod do
|
||||
database_url =
|
||||
System.get_env("DATABASE_URL") ||
|
||||
@@ -52,13 +65,14 @@ if config_env() == :prod do
|
||||
|
||||
config :provider_service, ProviderService.Repo,
|
||||
url: database_url,
|
||||
pool_size: 1,
|
||||
pool_size: String.to_integer(System.get_env("DATABASE_POOL_SIZE") || "1"),
|
||||
socket_options: maybe_ipv6
|
||||
|
||||
config :provider_service, ProviderService.EventStore,
|
||||
serializer: Commanded.Serialization.JsonSerializer,
|
||||
url: database_url,
|
||||
pool_size: 1
|
||||
schema: "eventstore",
|
||||
pool_size: String.to_integer(System.get_env("EVENTSTORE_POOL_SIZE") || "1")
|
||||
|
||||
secret_key_base =
|
||||
System.get_env("SECRET_KEY_BASE") ||
|
||||
@@ -72,9 +86,10 @@ if config_env() == :prod do
|
||||
config :provider_service, :dns_cluster_query, System.get_env("DNS_CLUSTER_QUERY")
|
||||
|
||||
config :provider_service, ProviderServiceWeb.Endpoint,
|
||||
url: [host: host, port: 80, scheme: "http"],
|
||||
url: [host: host, port: String.to_integer(System.get_env("PORT", "4000")), scheme: "http"],
|
||||
http: [
|
||||
ip: {0, 0, 0, 0, 0, 0, 0, 0}
|
||||
ip: {0, 0, 0, 0, 0, 0, 0, 0},
|
||||
port: String.to_integer(System.get_env("PORT", "4000"))
|
||||
],
|
||||
secret_key_base: secret_key_base
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user