add mjs for sed
This commit is contained in:
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user