Initial commit
Add nginx and certbot configurations
This commit is contained in:
23
nginx/get-certificates.Dockerfile
Normal file
23
nginx/get-certificates.Dockerfile
Normal file
@@ -0,0 +1,23 @@
|
||||
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
|
||||
|
||||
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 30 && killall nginx) &" > /entrypoint && \
|
||||
echo "cp /domains.txt /ssl/domains.txt" >> /entrypoint && \
|
||||
echo "nginx -g 'daemon off;'" >> /entrypoint && \
|
||||
echo "nginx" >> /entrypoint
|
||||
|
||||
ENTRYPOINT ["/bin/sh"]
|
||||
CMD ["/entrypoint"]
|
||||
Reference in New Issue
Block a user