Merge pull request #25 from Pagwin-Fedora/development

development
This commit is contained in:
Pagwin 2023-09-15 16:42:03 -04:00 committed by GitHub
commit 50c5a3f4ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -17,6 +17,8 @@ ADD ./scripts/template_convert.py /application/template_convert.py
ADD ./nginx.conf.template /application/nginx.conf.template
WORKDIR /application
USER application
ARG COMMENTS_BACKEND
ENV COMMENTS_BACKEND=${COMMENTS_BACKEND}
RUN ["python", "/application/template_convert.py"]
FROM nginx:1.25-alpine

View file

@ -14,7 +14,7 @@ if back == None:
buf = re.sub("###{---(.|\n)*###---}", "", buf)
else:
# ${{\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:
file.write(buf)