0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-21 22:22:43 -05:00
penpot/docker/images/files/nginx-entrypoint.sh

28 lines
714 B
Bash
Raw Normal View History

2020-09-09 15:49:06 +02:00
#!/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
2020-09-09 15:49:06 +02:00
exec "$@";