🔥 Remove unused config variables.

This commit is contained in:
Andrey Antukh 2021-01-29 11:00:54 +01:00 committed by Hirunatan
parent b44dfc2d9d
commit 393c9cd13c
5 changed files with 11 additions and 21 deletions

View file

@ -1,5 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -ex
export PENPOT_ASSERTS_ENABLED=true
set -ex
# clojure -Ojmx-remote -A:dev -e "(set! *warn-on-reflection* true)" -m rebel-readline.main # clojure -Ojmx-remote -A:dev -e "(set! *warn-on-reflection* true)" -m rebel-readline.main
clojure -A:jmx-remote:dev -J-Xms512m -J-Xmx512m -M -m rebel-readline.main clojure -A:jmx-remote:dev -J-Xms512m -J-Xmx512m -M -m rebel-readline.main

View file

@ -1,5 +1,7 @@
#!/bin/sh #!/bin/sh
export PENPOT_ASSERTS_ENABLED=true
set -ex set -ex
if [ ! -e ~/.fixtures-loaded ]; then if [ ! -e ~/.fixtures-loaded ]; then

View file

@ -19,12 +19,12 @@
(def defaults (def defaults
{:http-server-port 6060 {:http-server-port 6060
:http-server-cors "http://localhost:3449"
:database-uri "postgresql://127.0.0.1/penpot" :database-uri "postgresql://127.0.0.1/penpot"
:database-username "penpot" :database-username "penpot"
:database-password "penpot" :database-password "penpot"
:asserts-enabled true
:asserts-enabled false
:public-uri "http://localhost:3449" :public-uri "http://localhost:3449"
:redis-uri "redis://localhost/0" :redis-uri "redis://localhost/0"
@ -52,10 +52,9 @@
:registration-domain-whitelist "" :registration-domain-whitelist ""
:telemetry-enabled false :telemetry-enabled false
:telemetry-with-taiga true
:telemetry-uri "https://telemetry.penpot.app/" :telemetry-uri "https://telemetry.penpot.app/"
:debug true
;; LDAP auth disabled by default. Set ldap-auth-host to enable ;; LDAP auth disabled by default. Set ldap-auth-host to enable
;:ldap-auth-host "ldap.mysupercompany.com" ;:ldap-auth-host "ldap.mysupercompany.com"
;:ldap-auth-port 389 ;:ldap-auth-port 389
@ -76,8 +75,6 @@
}) })
(s/def ::http-server-port ::us/integer) (s/def ::http-server-port ::us/integer)
(s/def ::http-server-debug ::us/boolean)
(s/def ::http-server-cors ::us/string)
(s/def ::database-username (s/nilable ::us/string)) (s/def ::database-username (s/nilable ::us/string))
(s/def ::database-password (s/nilable ::us/string)) (s/def ::database-password (s/nilable ::us/string))
(s/def ::database-uri ::us/string) (s/def ::database-uri ::us/string)
@ -106,7 +103,6 @@
(s/def ::allow-demo-users ::us/boolean) (s/def ::allow-demo-users ::us/boolean)
(s/def ::registration-enabled ::us/boolean) (s/def ::registration-enabled ::us/boolean)
(s/def ::registration-domain-whitelist ::us/string) (s/def ::registration-domain-whitelist ::us/string)
(s/def ::debug ::us/boolean)
(s/def ::public-uri ::us/string) (s/def ::public-uri ::us/string)
(s/def ::srepl-host ::us/string) (s/def ::srepl-host ::us/string)
@ -153,7 +149,6 @@
::database-password ::database-password
::database-uri ::database-uri
::database-username ::database-username
::debug
::error-report-webhook ::error-report-webhook
::github-client-id ::github-client-id
::github-client-secret ::github-client-secret
@ -162,9 +157,7 @@
::gitlab-client-secret ::gitlab-client-secret
::google-client-id ::google-client-id
::google-client-secret ::google-client-secret
::http-server-debug
::http-server-port ::http-server-port
::http-server-cors
::ldap-auth-avatar-attribute ::ldap-auth-avatar-attribute
::ldap-auth-base-dn ::ldap-auth-base-dn
::ldap-auth-email-attribute ::ldap-auth-email-attribute

View file

@ -5,12 +5,11 @@
;; This Source Code Form is "Incompatible With Secondary Licenses", as ;; This Source Code Form is "Incompatible With Secondary Licenses", as
;; defined by the Mozilla Public License, v. 2.0. ;; defined by the Mozilla Public License, v. 2.0.
;; ;;
;; Copyright (c) 2020 UXBOX Labs SL ;; Copyright (c) 2020-2021 UXBOX Labs SL
(ns app.http.middleware (ns app.http.middleware
(:require (:require
[app.common.exceptions :as ex] [app.common.exceptions :as ex]
[app.config :as cfg]
[app.metrics :as mtx] [app.metrics :as mtx]
[app.util.transit :as t] [app.util.transit :as t]
[app.util.json :as json] [app.util.json :as json]
@ -47,7 +46,7 @@
:json (parse-json body) :json (parse-json body)
:transit (parse-transit body)) :transit (parse-transit body))
(catch Exception e (catch Exception e
(let [type (if (:debug @cfg/config) :json-verbose :json) (let [type :json-verbose
data {:type :parse data {:type :parse
:hint "unable to parse request body" :hint "unable to parse request body"
:message (ex-message e)}] :message (ex-message e)}]
@ -80,7 +79,7 @@
(defn- impl-format-response-body (defn- impl-format-response-body
[response] [response]
(let [body (:body response) (let [body (:body response)
type (if (:debug cfg/config) :json-verbose :json)] type :json-verbose]
(cond (cond
(coll? body) (coll? body)
(-> response (-> response

View file

@ -33,9 +33,6 @@ services:
- penpot-redis - penpot-redis
environment: environment:
# Used for creating tokens, important to be true random value
- PENPOT_SECRET_KEY=provide-here-a-secret-random-key
# Should be set to the public domain when penpot is going to be # Should be set to the public domain when penpot is going to be
# served. # served.
- PENPOT_PUBLIC_URI=http://localhost:9001 - PENPOT_PUBLIC_URI=http://localhost:9001
@ -78,9 +75,6 @@ services:
# - PENPOT_SMTP_TLS=true # - PENPOT_SMTP_TLS=true
# - PENPOT_SMTP_SSL=false # - PENPOT_SMTP_SSL=false
- PENPOT_ASSERTS_ENABLED=false
- PENPOT_DEBUG=false
networks: networks:
- penpot - penpot