add registration mode setting

This commit is contained in:
shibao 2021-09-04 16:54:48 -04:00 committed by oliviasculley
parent 6675c1dfab
commit 9be43eecbf
4 changed files with 8 additions and 4 deletions

View File

@ -16,7 +16,8 @@ config :cannery, CanneryWeb.Endpoint,
secret_key_base: "KH59P0iZixX5gP/u+zkxxG8vAAj6vgt0YqnwEB5JP5K+E567SsqkCz69uWShjE7I",
render_errors: [view: CanneryWeb.ErrorView, accepts: ~w(html json), layout: false],
pubsub_server: Cannery.PubSub,
live_view: [signing_salt: "zOLgd3lr"]
live_view: [signing_salt: "zOLgd3lr"],
registration: System.get_env("REGISTRATION") || "invite"
# Configures Elixir's Logger
config :logger, :console,

View File

@ -26,4 +26,5 @@ config :cannery, CanneryWeb.Endpoint,
transport_options: [socket_opts: [:inet6]]
],
secret_key_base: secret_key_base,
server: true
server: true,
registration: System.get_env("REGISTRATION") || "invite"

View File

@ -9,6 +9,8 @@ services:
DATABASE_URL: "ecto://postgres:postgres@cannery-db/cannery"
# generate a random base64 string 64 characters long, preferably not from a website
SECRET_KEY_BASE: "change-me-to-something-random-this-is-really-important-change-it"
# uncomment enable sign ups, watch for spam!
# REGISTRATION: "public"
ports:
# do not expose this publically!
# always host from behind a reverse proxy with a properly configured certificate