2020-09-09 15:49:06 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2021-02-08 13:25:42 +01:00
|
|
|
#########################################
|
|
|
|
## App Frontend config
|
|
|
|
#########################################
|
|
|
|
|
2021-06-15 17:24:00 +02:00
|
|
|
update_flags() {
|
2021-09-16 11:33:40 +02:00
|
|
|
if [ -n "$PENPOT_FLAGS" ]; then
|
2021-06-15 17:24:00 +02:00
|
|
|
sed -i \
|
2021-09-16 11:33:40 +02:00
|
|
|
-e "s|^//var penpotFlags = .*;|var penpotFlags = \"$PENPOT_FLAGS\";|g" \
|
2021-06-15 17:24:00 +02:00
|
|
|
"$1"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
update_flags /var/www/app/js/config.js
|
2023-03-06 10:49:26 +01:00
|
|
|
|
|
|
|
|
|
|
|
#########################################
|
|
|
|
## Nginx Config
|
|
|
|
#########################################
|
|
|
|
|
|
|
|
export PENPOT_BACKEND_URI=${PENPOT_BACKEND_URI:-http://penpot-backend:6060};
|
2023-04-04 14:55:58 +02:00
|
|
|
export PENPOT_EXPORTER_URI=${PENPOT_EXPORTER_URI:-http://penpot-exporter:6061};
|
2023-03-06 10:49:26 +01:00
|
|
|
|
|
|
|
envsubst "\$PENPOT_BACKEND_URI,\$PENPOT_EXPORTER_URI" < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf
|
|
|
|
|
2020-09-09 15:49:06 +02:00
|
|
|
exec "$@";
|