Files
geovisio-website/docker/docker-entrypoint.sh
2023-09-05 17:27:30 +00:00

17 lines
406 B
Bash

#!/bin/bash
ROOT_DIR=/usr/share/nginx/html
DOCKER_VARS=(VITE_INSTANCE_NAME VITE_API_URL VITE_TILES VITE_MAX_ZOOM)
echo "Setting env variables in web files"
for file in $ROOT_DIR/assets/*.js $ROOT_DIR/index.html; do
echo "Processing $file...";
for i in ${!DOCKER_VARS[@]}; do
sed -i "s|DOCKER_${DOCKER_VARS[i]}|${!DOCKER_VARS[i]}|g" $file
done
done
echo "GeoVisio website is now ready !"
exec "$@"