mirror of
https://github.com/Pagwin-Fedora/website.git
synced 2025-07-18 01:35:41 +00:00
I'm a dumbass
This commit is contained in:
parent
a4dc43452f
commit
9a5d99f9fc
2 changed files with 3 additions and 1 deletions
|
@ -17,6 +17,8 @@ ADD ./scripts/template_convert.py /application/template_convert.py
|
||||||
ADD ./nginx.conf.template /application/nginx.conf.template
|
ADD ./nginx.conf.template /application/nginx.conf.template
|
||||||
WORKDIR /application
|
WORKDIR /application
|
||||||
USER application
|
USER application
|
||||||
|
ARG COMMENTS_BACKEND
|
||||||
|
ENV COMMENTS_BACKEND=${COMMENTS_BACKEND}
|
||||||
RUN ["python", "/application/template_convert.py"]
|
RUN ["python", "/application/template_convert.py"]
|
||||||
|
|
||||||
FROM nginx:1.25-alpine
|
FROM nginx:1.25-alpine
|
||||||
|
|
|
@ -14,7 +14,7 @@ if back == None:
|
||||||
buf = re.sub("###{---(.|\n)*###---}", "", buf)
|
buf = re.sub("###{---(.|\n)*###---}", "", buf)
|
||||||
else:
|
else:
|
||||||
# ${{\s*$var_name\s*}}
|
# ${{\s*$var_name\s*}}
|
||||||
buf = re.sub(rf"\${{{{\s*{var_name}\s*}}}}",var_name,buf)
|
buf = re.sub(rf"\${{{{\s*{var_name}\s*}}}}",back,buf)
|
||||||
|
|
||||||
with open(file_name, "w+") as file:
|
with open(file_name, "w+") as file:
|
||||||
file.write(buf)
|
file.write(buf)
|
||||||
|
|
Loading…
Reference in a new issue