mirror of
https://github.com/penpot/penpot.git
synced 2025-05-12 12:56:39 +02:00
🚧 More work on register/recovery refactor.
This commit is contained in:
parent
9e68041326
commit
6165a49c10
10 changed files with 27 additions and 28 deletions
|
@ -136,7 +136,7 @@ The default production docker-compose already handles it for you,
|
||||||
but if you. So check the `docker/docker-compose.yml` file.
|
but if you. So check the `docker/docker-compose.yml` file.
|
||||||
|
|
||||||
|
|
||||||
### Auto configuration via environment variables
|
### Configuration via environment variables
|
||||||
|
|
||||||
The following environment variables are also honored for configuring
|
The following environment variables are also honored for configuring
|
||||||
your UXBOX instance:
|
your UXBOX instance:
|
||||||
|
@ -147,8 +147,7 @@ your UXBOX instance:
|
||||||
**Only available at build time!**
|
**Only available at build time!**
|
||||||
- `-e UXBOX_API_URL=...` (defaults to `/api`)
|
- `-e UXBOX_API_URL=...` (defaults to `/api`)
|
||||||
- `-e UXBOX_VIEW_URL=...` (defaults to `/view/`)
|
- `-e UXBOX_VIEW_URL=...` (defaults to `/view/`)
|
||||||
- `-e UXBOX_DEMO=...` (not defined, setting any value will activate demo mode)
|
- `-e UXBOX_DEMO_WARNING=...` (not defined, setting any value will activate demo mode)
|
||||||
- `-e UXBOX_DEBUG=...` (not defined, setting any value will activate debug mode)
|
|
||||||
|
|
||||||
Available at runtime:
|
Available at runtime:
|
||||||
- `-e LANG=...` (defaults to `en_US.UTF-8`)
|
- `-e LANG=...` (defaults to `en_US.UTF-8`)
|
||||||
|
|
|
@ -47,19 +47,18 @@
|
||||||
|
|
||||||
:google-api-key (lookup-env env :uxbox-google-api-key nil)
|
:google-api-key (lookup-env env :uxbox-google-api-key nil)
|
||||||
|
|
||||||
:email-reply-to (lookup-env env :uxbox-email-reply-to "no-reply@uxbox.io")
|
:email-reply-to (lookup-env env :uxbox-email-reply-to "no-reply@nodomain.com")
|
||||||
:email-from (lookup-env env :uxbox-email-from "no-reply@uxbox.io")
|
:email-from (lookup-env env :uxbox-email-from "no-reply@nodomain.com")
|
||||||
|
|
||||||
:smtp-host (lookup-env env :uxbox-smtp-host "localhost")
|
:smtp-host (lookup-env env :uxbox-smtp-host "smtp")
|
||||||
:smtp-port (lookup-env env :uxbox-smtp-port 25)
|
:smtp-port (lookup-env env :uxbox-smtp-port 25)
|
||||||
:smtp-user (lookup-env env :uxbox-smtp-user nil)
|
:smtp-user (lookup-env env :uxbox-smtp-user nil)
|
||||||
:smtp-password (lookup-env env :uxbox-smtp-password nil)
|
:smtp-password (lookup-env env :uxbox-smtp-password nil)
|
||||||
:smtp-tls (lookup-env env :uxbox-smtp-tls false)
|
:smtp-tls (lookup-env env :uxbox-smtp-tls false)
|
||||||
:smtp-ssl (lookup-env env :uxbox-smtp-ssl false)
|
:smtp-ssl (lookup-env env :uxbox-smtp-ssl false)
|
||||||
:smtp-enabled (lookup-env env :uxbox-smtp-enabled false)
|
:smtp-enabled (lookup-env env :uxbox-smtp-enabled true)
|
||||||
|
|
||||||
:registration-enabled (lookup-env env :uxbox-registration-enabled true)
|
:registration-enabled (lookup-env env :uxbox-registration-enabled true)})
|
||||||
:secret (lookup-env env :uxbox-secret "5qjiAndGY3")})
|
|
||||||
|
|
||||||
(defn read-test-config
|
(defn read-test-config
|
||||||
[]
|
[]
|
||||||
|
|
|
@ -67,11 +67,6 @@ services:
|
||||||
- UXBOX_SMTP_TLS=false
|
- UXBOX_SMTP_TLS=false
|
||||||
- UXBOX_SMTP_ENABLED=false
|
- UXBOX_SMTP_ENABLED=false
|
||||||
|
|
||||||
## Security setup
|
|
||||||
# Overwrite with a randomy generated string. Mainly used as
|
|
||||||
# shared key for sign cookies, tokens, etc.
|
|
||||||
- UXBOX_SECRET="the very secret string"
|
|
||||||
|
|
||||||
frontend:
|
frontend:
|
||||||
image: uxbox-frontend:latest
|
image: uxbox-frontend:latest
|
||||||
restart: always
|
restart: always
|
||||||
|
|
|
@ -1090,4 +1090,7 @@ input[type=range]:focus::-ms-fill-upper {
|
||||||
p {
|
p {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
.code {
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,5 +8,5 @@
|
||||||
|
|
||||||
(goog-define url "http://127.0.0.1:6060/api")
|
(goog-define url "http://127.0.0.1:6060/api")
|
||||||
(goog-define viewurl "/view/index.html")
|
(goog-define viewurl "/view/index.html")
|
||||||
(goog-define isdemo false)
|
(goog-define demo-warning false)
|
||||||
(goog-define default-language "en")
|
(goog-define default-language "en")
|
||||||
|
|
|
@ -40,9 +40,9 @@
|
||||||
[_]
|
[_]
|
||||||
[:div.message-inline
|
[:div.message-inline
|
||||||
[:p
|
[:p
|
||||||
[:strong "WARNING: "] "this is a " [:strong "demo"] " service."
|
[:strong "WARNING: "]
|
||||||
[:br]
|
"This is a " [:strong "demo"] " service, "
|
||||||
[:strong "DO NOT USE"] " for real work, " [:br]
|
[:strong "DO NOT USE"] " for real work, "
|
||||||
" the projects will be periodicaly wiped."]])
|
" the projects will be periodicaly wiped."]])
|
||||||
|
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
(let [{:keys [data] :as form} (fm/use-form ::login-form {})]
|
(let [{:keys [data] :as form} (fm/use-form ::login-form {})]
|
||||||
[:form {:on-submit #(on-submit % form)}
|
[:form {:on-submit #(on-submit % form)}
|
||||||
[:div.login-content
|
[:div.login-content
|
||||||
(when cfg/isdemo
|
(when cfg/demo-warning
|
||||||
[:& demo-warning])
|
[:& demo-warning])
|
||||||
|
|
||||||
[:input.input-text
|
[:input.input-text
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
[]
|
[]
|
||||||
(let [{:keys [data] :as form} (fm/use-form ::recovery-form {})
|
(let [{:keys [data] :as form} (fm/use-form ::recovery-form {})
|
||||||
tr (i18n/use-translations)
|
tr (i18n/use-translations)
|
||||||
|
|
||||||
on-success
|
on-success
|
||||||
(fn []
|
(fn []
|
||||||
(st/emit! (um/info (tr "profile.recovery.password-changed"))
|
(st/emit! (um/info (tr "profile.recovery.password-changed"))
|
||||||
|
|
|
@ -35,7 +35,9 @@
|
||||||
tr (i18n/use-translations)
|
tr (i18n/use-translations)
|
||||||
on-success
|
on-success
|
||||||
(fn []
|
(fn []
|
||||||
(st/emit! (um/info (tr "profile.recovery.recovery-token-sent"))))
|
(st/emit! (um/info (tr "profile.recovery.recovery-token-sent"))
|
||||||
|
(rt/nav :profile-recovery)))
|
||||||
|
|
||||||
on-submit
|
on-submit
|
||||||
(fn [event]
|
(fn [event]
|
||||||
(dom/prevent-default event)
|
(dom/prevent-default event)
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
(require '[clojure.pprint :refer [pprint]]
|
(require '[clojure.pprint :refer [pprint]]
|
||||||
'[clojure.java.shell :as shell]
|
'[clojure.java.shell :as shell]
|
||||||
'[clojure.java.io :as io]
|
'[clojure.java.io :as io]
|
||||||
|
'[clojure.edn :as edn]
|
||||||
'[figwheel.main.api :as figwheel]
|
'[figwheel.main.api :as figwheel]
|
||||||
'[environ.core :refer [env]]
|
'[environ.core :refer [env]])
|
||||||
'[jsonista.core :as json]
|
|
||||||
'[cognitect.transit :as t])
|
|
||||||
(require '[cljs.build.api :as api]
|
(require '[cljs.build.api :as api]
|
||||||
'[cljs.repl :as repl]
|
'[cljs.repl :as repl]
|
||||||
'[cljs.repl.node :as node])
|
'[cljs.repl.node :as node])
|
||||||
|
@ -28,13 +27,12 @@
|
||||||
|
|
||||||
;; --- Generic Build Options
|
;; --- Generic Build Options
|
||||||
|
|
||||||
(def debug? (boolean (:uxbox-debug env nil)))
|
(def demo? (edn/read-string (:uxbox-demo-warning env "true")))
|
||||||
(def demo? (boolean (:uxbox-demo env nil)))
|
|
||||||
|
|
||||||
(def closure-defines
|
(def closure-defines
|
||||||
{"uxbox.config.url" (:uxbox-api-url env "http://localhost:6060/api")
|
{'uxbox.config.url (:uxbox-api-url env "http://localhost:6060/api")
|
||||||
"uxbox.config.viewurl" (:uxbox-view-url env "/view/index.html")
|
'uxbox.config.viewurl (:uxbox-view-url env "/view/index.html")
|
||||||
"uxbox.config.isdemo" demo?})
|
'uxbox.config.demo-warning demo?})
|
||||||
|
|
||||||
(def default-build-options
|
(def default-build-options
|
||||||
{:cache-analysis true
|
{:cache-analysis true
|
||||||
|
@ -42,6 +40,7 @@
|
||||||
:language-in :ecmascript6
|
:language-in :ecmascript6
|
||||||
:language-out :ecmascript5
|
:language-out :ecmascript5
|
||||||
:closure-defines closure-defines
|
:closure-defines closure-defines
|
||||||
|
:anon-fn-naming-policy :mapped
|
||||||
:optimizations :none
|
:optimizations :none
|
||||||
:infer-externs true
|
:infer-externs true
|
||||||
:verbose false
|
:verbose false
|
||||||
|
|
|
@ -93,6 +93,7 @@ function build-frontend-local {
|
||||||
-v $HOME/.m2:/home/uxbox/.m2 \
|
-v $HOME/.m2:/home/uxbox/.m2 \
|
||||||
-e UXBOX_API_URL="/api" \
|
-e UXBOX_API_URL="/api" \
|
||||||
-e UXBOX_VIEW_URL="/view" \
|
-e UXBOX_VIEW_URL="/view" \
|
||||||
|
-e UXBOX_DEMO_WARNING=true \
|
||||||
$CONTAINER ./scripts/build-$BUILD_TYPE.sh
|
$CONTAINER ./scripts/build-$BUILD_TYPE.sh
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue