From b13c6d512f233c30f1fe7e4f69321f7f46a60926 Mon Sep 17 00:00:00 2001 From: Guus van Meerveld Date: Mon, 13 Feb 2023 14:17:56 +0100 Subject: [PATCH] Made ALLOW_REGISTRATION env public to the frontend --- docker-compose.yml | 4 ++++ src/utils/config.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index fc29a83..049a64d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,6 +5,10 @@ services: build: . container_name: portfolio environment: + NEXT_PUBLIC_GITEA_USERNAME: "Guusvanmeerveld" + NEXT_PUBLIC_GITEA_SERVER: "git.guusvanmeerveld.dev" + SESSION_PASSWORD: "jsdlakfjad;slkfjepoweaur3290r830-q998-039jaklfjdkl" + NEXT_PUBLIC_ALLOW_REGISTRATION: true DATABASE_URL: "postgres://portfolio:portfolio@db:5432/portfolio" ports: - 3000:3000 diff --git a/src/utils/config.ts b/src/utils/config.ts index b31792d..9c9ed10 100644 --- a/src/utils/config.ts +++ b/src/utils/config.ts @@ -16,7 +16,7 @@ export const sessionOptions = { }; export const registrationIsEnabled = process.env.ALLOW_REGISTRATION - ? process.env.ALLOW_REGISTRATION == "true" + ? process.env.NEXT_PUBLIC_ALLOW_REGISTRATION == "true" : false; export const saltRoundsForPassword =