add mjs for sed

This commit is contained in:
Pavel Mineev
2021-01-13 23:16:29 -06:00
committed by Umputun
parent eb6ef87d42
commit 3e0f233c5a
2 changed files with 2 additions and 4 deletions
+1 -2
View File
@@ -42,8 +42,7 @@ COPY --from=build-frontend /srv/frontend/public/ web
RUN \
export WEB_ROOT=/build/backend/web && \
sed -i "s|{% REMARK_URL %}http://127.0.0.1:8080|g" ${WEB_ROOT}/*.js && \
sed -i "s|{% REMARK_URL %}http://127.0.0.1:8080|g" ${WEB_ROOT}/*.html && \
find . -regex '.*\.\(html\|js\|mjs\)$' -print -exec sed -i "s|{% REMARK_URL %}|http://127.0.0.1:8080|g" {} \; && \
statik --src=${WEB_ROOT} --dest=/build/backend/app/rest -p api -f && \
statik --src=/build/backend/templates --dest=/build/backend/app -p templates -ns templates -f && \
ls -la /build/backend/app/templates/statik.go && \
+1 -2
View File
@@ -1,8 +1,7 @@
#!/bin/sh
echo "prepare environment"
# replace {% REMARK_URL %} by content of REMARK_URL variable
sed -i "s|{% REMARK_URL %}|${REMARK_URL}|g" /srv/web/*.html
sed -i "s|{% REMARK_URL %}|${REMARK_URL}|g" /srv/web/*.js
find . -regex '.*\.\(html\|js\|mjs\)$' -print -exec sed -i "s|{% REMARK_URL %}|${REMARK_URL}|g" {} \;
if [ -n "${SITE_ID}" ]; then
#replace "site_id: 'remark'" by SITE_ID