0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-01 20:09:04 -05:00
penpot/docker/images/files/nginx-entrypoint.sh
Leon e9daaa2eb8 🐛 Fix default port for penpot-exporter on nginx entrypoint
By default, penpot-frontend will try to reach penpot-export on port 80,
this is wrong, the exporter listens by default to port 6061.
2023-04-04 19:09:44 +02:00

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 "$@";