mirror of
https://github.com/penpot/penpot.git
synced 2025-02-01 20:09:04 -05:00
e9daaa2eb8
By default, penpot-frontend will try to reach penpot-export on port 80, this is wrong, the exporter listens by default to port 6061.
27 lines
714 B
Bash
27 lines
714 B
Bash
#!/usr/bin/env bash
|
|
|
|
#########################################
|
|
## App Frontend config
|
|
#########################################
|
|
|
|
update_flags() {
|
|
if [ -n "$PENPOT_FLAGS" ]; then
|
|
sed -i \
|
|
-e "s|^//var penpotFlags = .*;|var penpotFlags = \"$PENPOT_FLAGS\";|g" \
|
|
"$1"
|
|
fi
|
|
}
|
|
|
|
update_flags /var/www/app/js/config.js
|
|
|
|
|
|
#########################################
|
|
## Nginx Config
|
|
#########################################
|
|
|
|
export PENPOT_BACKEND_URI=${PENPOT_BACKEND_URI:-http://penpot-backend:6060};
|
|
export PENPOT_EXPORTER_URI=${PENPOT_EXPORTER_URI:-http://penpot-exporter:6061};
|
|
|
|
envsubst "\$PENPOT_BACKEND_URI,\$PENPOT_EXPORTER_URI" < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf
|
|
|
|
exec "$@";
|