Changes: - fix README.md old json format usage - rename "redirect" option to "proxy_pass" - move docker-compose.yml and nginx.conf.j2 to examples and add to .gitignore - fix situation when one domain from domains.txt and servers.yaml appeared twice in nginx.conf
25 lines
663 B
Docker
25 lines
663 B
Docker
FROM python:3.10-alpine AS builder
|
|
|
|
COPY add_servers.py /add_servers.py
|
|
COPY domains.txt /domains.txt
|
|
COPY nginx.conf /nginx.conf
|
|
|
|
RUN python /add_servers.py --nginx /nginx.conf --domains_list_txt /domains.txt --http-only
|
|
|
|
# service
|
|
|
|
FROM nginx:alpine
|
|
|
|
COPY proxy_common.conf /etc/nginx/proxy_common.conf
|
|
COPY server_common.conf /etc/nginx/server_common.conf
|
|
|
|
COPY --from=builder /nginx.conf /etc/nginx/nginx.conf
|
|
COPY domains.txt /domains.txt
|
|
|
|
RUN echo "(sleep 120 && killall nginx) &" > /entrypoint && \
|
|
echo "cp /domains.txt /ssl/domains.txt" >> /entrypoint && \
|
|
echo "nginx -g 'daemon off;'" >> /entrypoint
|
|
|
|
ENTRYPOINT ["/bin/sh"]
|
|
CMD ["/entrypoint"]
|