From 0b984a44d78f9c12816235d1482f62799d830dc7 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 4 Apr 2022 10:52:50 +0200 Subject: [PATCH] :bug: Fix default configuration --- backend/scripts/repl | 5 ++++- backend/scripts/start-dev | 4 +++- backend/src/app/config.clj | 3 +-- docker/devenv/docker-compose.yaml | 2 -- docker/images/config.env | 2 +- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/backend/scripts/repl b/backend/scripts/repl index ed84823ae..86eaccb80 100755 --- a/backend/scripts/repl +++ b/backend/scripts/repl @@ -1,5 +1,9 @@ #!/usr/bin/env bash +export PENPOT_HOST=devenv +export PENPOT_TENANT=dev +export PENPOT_FLAGS="$PENPOT_FLAGS enable-backend-asserts enable-secure-session-cookies enable-audit-log enable-cors enable-transit-readable-response enable-demo-users" + # export PENPOT_DATABASE_URI="postgresql://172.17.0.1:5432/penpot" # export PENPOT_DATABASE_USERNAME="penpot" # export PENPOT_DATABASE_PASSWORD="penpot" @@ -8,7 +12,6 @@ # export PENPOT_DATABASE_URI="postgresql://172.17.0.1:5432/penpot_pre" # export PENPOT_DATABASE_USERNAME="penpot_pre" # export PENPOT_DATABASE_PASSWORD="penpot_pre" -export PENPOT_FLAGS="enable-asserts enable-audit-log $PENPOT_FLAGS" # Initialize MINIO config # mc alias set penpot-s3/ http://minio:9000 minioadmin minioadmin diff --git a/backend/scripts/start-dev b/backend/scripts/start-dev index 87f1a78a7..3a7c6f039 100755 --- a/backend/scripts/start-dev +++ b/backend/scripts/start-dev @@ -1,6 +1,8 @@ #!/usr/bin/env bash -export PENPOT_FLAGS="$PENPOT_FLAGS enable-asserts" +export PENPOT_HOST=devenv +export PENPOT_TENANT=dev +export PENPOT_FLAGS="$PENPOT_FLAGS enable-backend-asserts enable-audit-log enable-cors enable-transit-readable-response enable-demo-users" set -ex diff --git a/backend/src/app/config.clj b/backend/src/app/config.clj index c0e3ea5ac..26f65c6ec 100644 --- a/backend/src/app/config.clj +++ b/backend/src/app/config.clj @@ -312,8 +312,7 @@ ::tenant])) (def default-flags - [:enable-backend-asserts - :enable-backend-api-doc + [:enable-backend-api-doc :enable-secure-session-cookies]) (defn- parse-flags diff --git a/docker/devenv/docker-compose.yaml b/docker/devenv/docker-compose.yaml index fcb5a0351..2772b6b11 100644 --- a/docker/devenv/docker-compose.yaml +++ b/docker/devenv/docker-compose.yaml @@ -52,7 +52,6 @@ services: - PENPOT_SMTP_PASSWORD= - PENPOT_SMTP_SSL=false - PENPOT_SMTP_TLS=false - - PENPOT_FLAGS="enable-cors enable-insecure-register enable-audit-log disable-secure-session-cookies" # LDAP setup - PENPOT_LDAP_HOST=ldap @@ -119,7 +118,6 @@ services: - PENPOT_SMTP_PASSWORD= - PENPOT_SMTP_SSL=false - PENPOT_SMTP_TLS=false - - PENPOT_FLAGS="enable-cors enable-audit-log" # LDAP setup - PENPOT_LDAP_HOST=ldap diff --git a/docker/images/config.env b/docker/images/config.env index d6e468640..484b900e4 100644 --- a/docker/images/config.env +++ b/docker/images/config.env @@ -40,7 +40,7 @@ PENPOT_SMTP_DEFAULT_REPLY_TO=no-reply@example.com # Feature flags. Right now they are only affect frontend, but in # future release they will affect to both backend and frontend. -PENPOT_FLAGS="enable-registration enable-demo-users" +PENPOT_FLAGS="enable-registration" # Comma separated list of allowed domains to register. Empty to allow all. # PENPOT_REGISTRATION_DOMAIN_WHITELIST=""