diff --git a/config/config.exs b/config/config.exs index 4aa98de..338a3de 100644 --- a/config/config.exs +++ b/config/config.exs @@ -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, diff --git a/config/prod.exs b/config/prod.exs index 5030053..106c953 100644 --- a/config/prod.exs +++ b/config/prod.exs @@ -13,7 +13,7 @@ config :cannery, CanneryWeb.Endpoint, url: [host: "localhost"], http: [port: 4000], cache_static_manifest: "priv/static/cache_manifest.json" - + config :cannery, Cannery.Repo, url: "ecto://postgres:postgres@localhost/cannery", pool_size: 10 diff --git a/config/releases.exs b/config/releases.exs index 03edfc0..d2d8e7d 100644 --- a/config/releases.exs +++ b/config/releases.exs @@ -6,7 +6,7 @@ import Config database_url = System.get_env("DATABASE_URL") || - "ecto://postgres:postgres@cannery-db/cannery" + "ecto://postgres:postgres@cannery-db/cannery" config :cannery, Cannery.Repo, # ssl: true, @@ -26,4 +26,5 @@ config :cannery, CanneryWeb.Endpoint, transport_options: [socket_opts: [:inet6]] ], secret_key_base: secret_key_base, - server: true \ No newline at end of file + server: true, + registration: System.get_env("REGISTRATION") || "invite" diff --git a/docker-compose.yml b/docker-compose.yml index 0f34df7..dd4110f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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