Skip to content

Commit

Permalink
removed certbot installation from nginx docker file
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenaH84 committed Jun 16, 2024
1 parent 2136df0 commit ba3f68f
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions nginx/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,9 @@
FROM nginx:latest

# Install Certbot and dependencies
RUN apt-get update && \
apt-get install -y certbot python3-certbot-nginx && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Create the necessary directories for Let's Encrypt challenges
RUN mkdir -p /usr/share/nginx/html/.well-known/acme-challenge \
&& chown -R www-data:www-data /usr/share/nginx/html/.well-known \
&& chmod -R 755 /usr/share/nginx/html/.well-known

# Remove default Nginx configuration files
RUN rm /etc/nginx/nginx.conf
RUN rm /etc/nginx/conf.d/default.conf

# Copy your custom Nginx configuration
COPY nginx.conf /etc/nginx/
COPY project.conf /etc/nginx/conf.d/

# Copy SSL certificate renewal script
COPY renew-certs.sh /renew-certs.sh
RUN chmod +x /renew-certs.sh

# Entrypoint to handle certificate issuance and renewal
ENTRYPOINT ["/renew-certs.sh"]
COPY project.conf /etc/nginx/conf.d/

0 comments on commit ba3f68f

Please sign in to comment.