mirror of
https://github.com/TheRealOwenRees/chess-endgame-trainer.git
synced 2026-11-18 11:42:07 +00:00
prelaunch env var prevents the site from being operational
This commit is contained in:
@@ -17,6 +17,11 @@ config :chesstrainer, :branding,
|
||||
support_email: "support@innersquare.app",
|
||||
mail_from: "no-reply@innersquare.app"
|
||||
|
||||
# Prelaunch gating. Production sets these from PRELAUNCH and
|
||||
# MAILING_LIST_ENABLED; dev and test use these defaults.
|
||||
config :chesstrainer, :prelaunch, false
|
||||
config :chesstrainer, :mailing_list_enabled, true
|
||||
|
||||
config :chesstrainer, :scopes,
|
||||
user: [
|
||||
default: true,
|
||||
|
||||
+5
-1
@@ -15,11 +15,15 @@ config :chesstrainer, ChesstrainerWeb.Endpoint,
|
||||
force_ssl: [
|
||||
rewrite_on: [:x_forwarded_proto],
|
||||
exclude: [
|
||||
# paths: ["/health"],
|
||||
paths: ["/health"],
|
||||
hosts: ["localhost", "127.0.0.1"]
|
||||
]
|
||||
]
|
||||
|
||||
# Fail closed in production: the mailing list stays off until SES production
|
||||
# access is granted and MAILING_LIST_ENABLED is set explicitly.
|
||||
config :chesstrainer, :mailing_list_enabled, false
|
||||
|
||||
# Configure Swoosh API Client
|
||||
config :swoosh, api_client: Swoosh.ApiClient.Req
|
||||
|
||||
|
||||
@@ -20,6 +20,14 @@ if System.get_env("PHX_SERVER") do
|
||||
config :chesstrainer, ChesstrainerWeb.Endpoint, server: true
|
||||
end
|
||||
|
||||
if prelaunch = System.get_env("PRELAUNCH") do
|
||||
config :chesstrainer, :prelaunch, prelaunch in ~w(true 1)
|
||||
end
|
||||
|
||||
if mailing_list_enabled = System.get_env("MAILING_LIST_ENABLED") do
|
||||
config :chesstrainer, :mailing_list_enabled, mailing_list_enabled in ~w(true 1)
|
||||
end
|
||||
|
||||
# Local Syzygy tablebases: set TABLEBASE_PATH to the directory holding the
|
||||
# .rtbw/.rtbz files. When unset, the local backend stays disabled and lookups
|
||||
# fall back to Lichess.
|
||||
|
||||
Reference in New Issue
Block a user