mirror of
https://github.com/penpot/penpot.git
synced 2025-05-06 10:05:54 +02:00
🐛 Fix frontend docker image entry point.
This commit is contained in:
parent
e48b01fd18
commit
bff0030f2b
3 changed files with 16 additions and 42 deletions
|
@ -35,17 +35,12 @@ PENPOT_SMTP_DEFAULT_REPLY_TO=no-reply@example.com
|
||||||
# PENPOT_SMTP_TLS=true
|
# PENPOT_SMTP_TLS=true
|
||||||
# PENPOT_SMTP_SSL=false
|
# PENPOT_SMTP_SSL=false
|
||||||
|
|
||||||
# Enable or disable external user registration process.
|
# Flags that enables features on frontend applitation.
|
||||||
PENPOT_REGISTRATION_ENABLED=true
|
PENPOT_FRONTEND_FLAGS="enable-registration enable-demo-users"
|
||||||
|
|
||||||
# Comma separated list of allowed domains to register. Empty to allow all.
|
# Comma separated list of allowed domains to register. Empty to allow all.
|
||||||
# PENPOT_REGISTRATION_DOMAIN_WHITELIST=""
|
# PENPOT_REGISTRATION_DOMAIN_WHITELIST=""
|
||||||
|
|
||||||
# Penpot comes with the facility to create quick demo users that are
|
|
||||||
# automatically deleted after some time. This settings enables or disables the
|
|
||||||
# creation of demo users.
|
|
||||||
PENPOT_ALLOW_DEMO_USERS=true
|
|
||||||
|
|
||||||
## Authentication providers
|
## Authentication providers
|
||||||
|
|
||||||
# Google
|
# Google
|
||||||
|
|
|
@ -9,26 +9,6 @@ log() {
|
||||||
## App Frontend config
|
## App Frontend config
|
||||||
#########################################
|
#########################################
|
||||||
|
|
||||||
update_demo_warning() {
|
|
||||||
if [ -n "$PENPOT_DEMO_WARNING" ]; then
|
|
||||||
log "Updating Demo Warning: $PENPOT_DEMO_WARNING"
|
|
||||||
sed -i \
|
|
||||||
-e "s|^//var penpotDemoWarning = .*;|var penpotDemoWarning = $PENPOT_DEMO_WARNING;|g" \
|
|
||||||
"$1"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
update_allow_demo_users() {
|
|
||||||
if [ -n "$PENPOT_ALLOW_DEMO_USERS" ]; then
|
|
||||||
log "Updating Allow Demo Users: $PENPOT_ALLOW_DEMO_USERS"
|
|
||||||
sed -i \
|
|
||||||
-e "s|^//var penpotAllowDemoUsers = .*;|var penpotAllowDemoUsers = $PENPOT_ALLOW_DEMO_USERS;|g" \
|
|
||||||
"$1"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
update_google_client_id() {
|
update_google_client_id() {
|
||||||
if [ -n "$PENPOT_GOOGLE_CLIENT_ID" ]; then
|
if [ -n "$PENPOT_GOOGLE_CLIENT_ID" ]; then
|
||||||
log "Updating Google Client Id: $PENPOT_GOOGLE_CLIENT_ID"
|
log "Updating Google Client Id: $PENPOT_GOOGLE_CLIENT_ID"
|
||||||
|
@ -67,6 +47,7 @@ update_oidc_client_id() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# DEPRECATED
|
||||||
update_login_with_ldap() {
|
update_login_with_ldap() {
|
||||||
if [ -n "$PENPOT_LOGIN_WITH_LDAP" ]; then
|
if [ -n "$PENPOT_LOGIN_WITH_LDAP" ]; then
|
||||||
log "Updating Login with LDAP: $PENPOT_LOGIN_WITH_LDAP"
|
log "Updating Login with LDAP: $PENPOT_LOGIN_WITH_LDAP"
|
||||||
|
@ -76,7 +57,7 @@ update_login_with_ldap() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# DEPRECATED
|
||||||
update_registration_enabled() {
|
update_registration_enabled() {
|
||||||
if [ -n "$PENPOT_REGISTRATION_ENABLED" ]; then
|
if [ -n "$PENPOT_REGISTRATION_ENABLED" ]; then
|
||||||
log "Updating Registration Enabled: $PENPOT_REGISTRATION_ENABLED"
|
log "Updating Registration Enabled: $PENPOT_REGISTRATION_ENABLED"
|
||||||
|
@ -86,30 +67,19 @@ update_registration_enabled() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
update_analytics_enabled() {
|
|
||||||
if [ -n "$PENPOT_ANALYTICS_ENABLED" ]; then
|
|
||||||
sed -i \
|
|
||||||
-e "s|^//var penpotAnalyticsEnabled = .*;|var penpotAnalyticsEnabled = $PENPOT_ANALYTICS_ENABLED;|g" \
|
|
||||||
"$1"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
update_flags() {
|
update_flags() {
|
||||||
if [ -n "$PENPOT_FLAGS" ]; then
|
if [ -n "$PENPOT_FRONTEND_FLAGS" ]; then
|
||||||
sed -i \
|
sed -i \
|
||||||
-e "s|^//var penpotFlags = .*;|var penpotFlags = \"$PENPOT_FLAGS\";|g" \
|
-e "s|^//var penpotFlags = .*;|var penpotFlags = \"$PENPOT_FRONTEND_FLAGS\";|g" \
|
||||||
"$1"
|
"$1"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
update_demo_warning /var/www/app/js/config.js
|
|
||||||
update_allow_demo_users /var/www/app/js/config.js
|
|
||||||
update_google_client_id /var/www/app/js/config.js
|
update_google_client_id /var/www/app/js/config.js
|
||||||
update_gitlab_client_id /var/www/app/js/config.js
|
update_gitlab_client_id /var/www/app/js/config.js
|
||||||
update_github_client_id /var/www/app/js/config.js
|
update_github_client_id /var/www/app/js/config.js
|
||||||
update_oidc_client_id /var/www/app/js/config.js
|
update_oidc_client_id /var/www/app/js/config.js
|
||||||
update_login_with_ldap /var/www/app/js/config.js
|
update_login_with_ldap /var/www/app/js/config.js
|
||||||
update_registration_enabled /var/www/app/js/config.js
|
update_registration_enabled /var/www/app/js/config.js
|
||||||
update_analytics_enabled /var/www/app/js/config.js
|
|
||||||
update_flags /var/www/app/js/config.js
|
update_flags /var/www/app/js/config.js
|
||||||
exec "$@";
|
exec "$@";
|
||||||
|
|
|
@ -54,6 +54,15 @@
|
||||||
:browser
|
:browser
|
||||||
:webworker))
|
:webworker))
|
||||||
|
|
||||||
|
(def available-flags
|
||||||
|
#{:registration
|
||||||
|
:audit-log
|
||||||
|
:demo-users
|
||||||
|
:user-feedback
|
||||||
|
:demo-users
|
||||||
|
:demo-warning
|
||||||
|
:login-with-ldap})
|
||||||
|
|
||||||
(def default-flags
|
(def default-flags
|
||||||
#{:registration :demo-users})
|
#{:registration :demo-users})
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue