Fix cron entry syntax in Dockerfile for HAProxy reload
All checks were successful
HAProxy Manager Build and Push / Build-and-Push (push) Successful in 1m57s

Escape inner quotes in the certbot renewal cron job to properly
send reload command to HAProxy via socat after certificate renewal.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-09-22 14:49:45 -07:00
parent 402c48b4a0
commit 002e79b565

View File

@@ -7,7 +7,7 @@ COPY haproxy_manager.py /haproxy/
COPY scripts /haproxy/scripts COPY scripts /haproxy/scripts
RUN chmod +x /haproxy/scripts/* RUN chmod +x /haproxy/scripts/*
RUN pip install -r requirements.txt RUN pip install -r requirements.txt
RUN echo "0 */12 * * * root test -x /usr/bin/certbot && /usr/bin/certbot -q renew" > /var/spool/cron/crontabs/root RUN echo "0 */12 * * * root test -x /usr/bin/certbot && /usr/bin/certbot -q renew && echo \"reload\" | socat stdio /tmp/haproxy-cli" > /var/spool/cron/crontabs/root
# Create log directories # Create log directories
RUN mkdir -p /var/log && touch /var/log/haproxy-manager.log /var/log/haproxy-manager-errors.log RUN mkdir -p /var/log && touch /var/log/haproxy-manager.log /var/log/haproxy-manager-errors.log
RUN chmod 755 /var/log/haproxy-manager.log /var/log/haproxy-manager-errors.log RUN chmod 755 /var/log/haproxy-manager.log /var/log/haproxy-manager-errors.log