Skip to content

Commit

Permalink
directory creation for ssl certificate
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenaH84 committed Jun 15, 2024
1 parent 2ddebf7 commit de0f164
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions nginx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,18 @@ RUN apt-get update && \
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
Expand Down

0 comments on commit de0f164

Please sign in to comment.