Skip to content

Commit

Permalink
all variables in entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
akablockchain2 committed Feb 23, 2025
1 parent 3f11c82 commit 5f1fb7d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion frontend/docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,17 @@ echo "Injecting environment variables into HTML files..."
# Перебор всех HTML файлов и подстановка переменных
for file in $(find /usr/share/nginx/html -type f -name "*.html"); do
echo "Processing $file"
sed -i "s|%NX_DATA_API_URL%|${NX_DATA_API_URL}|g" "$file"
sed -i \
-e "s|%NODE_ENV%|${NODE_ENV}|g" \
-e "s|%NX_CDN_ASSETS%|${NX_CDN_ASSETS}|g" \
-e "s|%NX_ENABLE_TELEMETRY%|${NX_ENABLE_TELEMETRY}|g" \
-e "s|%NX_URL_PREFIX%|${NX_URL_PREFIX}|g" \
-e "s|%NX_DATA_API_URL%|${NX_DATA_API_URL}|g" \
-e "s|%NX_SERVER_VERSION%|${NX_SERVER_VERSION}|g" \
-e "s|%NX_CONSOLE_MODE%|${NX_CONSOLE_MODE}|g" \
-e "s|%NX_HASURA_CONSOLE_TYPE%|${NX_HASURA_CONSOLE_TYPE}|g" \
"$file"

done

echo "Starting Nginx..."
Expand Down

0 comments on commit 5f1fb7d

Please sign in to comment.