1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2026-05-16 20:41:55 +00:00

[Nginx] use python bootstrapper to start NGINX container

This commit is contained in:
FreddleSpl0it
2025-05-19 09:45:00 +02:00
parent 1d482ed425
commit cde2ba4851
15 changed files with 204 additions and 171 deletions

View File

@@ -5,14 +5,20 @@ ENV PIP_BREAK_SYSTEM_PACKAGES=1
RUN apk add --no-cache nginx \
python3 \
supervisor \
py3-pip && \
pip install --upgrade pip && \
pip install Jinja2
pip install Jinja2 \
mysql-connector-python
RUN mkdir -p /etc/nginx/includes
COPY ./bootstrap.py /
COPY ./docker-entrypoint.sh /
COPY data/Dockerfiles/bootstrap /bootstrap
COPY data/Dockerfiles/nginx/docker-entrypoint.sh /
COPY data/Dockerfiles/nginx/supervisord.conf /etc/supervisor/supervisord.conf
COPY data/Dockerfiles/nginx/stop-supervisor.sh /usr/local/sbin/stop-supervisor.sh
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["nginx", "-g", "daemon off;"]
RUN chmod +x /docker-entrypoint.sh
RUN chmod +x /usr/local/sbin/stop-supervisor.sh
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]