diff --git a/services/certbot/Dockerfile b/services/certbot/Dockerfile new file mode 100644 index 00000000..73574845 --- /dev/null +++ b/services/certbot/Dockerfile @@ -0,0 +1,19 @@ +FROM ubuntu:22.04 +LABEL author="Jeppe B" + +# Set the volume for certbot +VOLUME ["/etc/letsencrypt", "/var/lib/letsencrypt"] + +# Install dependencies +RUN apt-get update && \ + apt-get install -y certbot python3-certbot-nginx && \ + rm -rf /var/lib/apt/lists/* + +# Create a directory for certbot +RUN mkdir -p /etc/letsencrypt +# Set the working directory +WORKDIR /etc/letsencrypt +# Expose port 80 for the standalone server +EXPOSE 80 +# Command to run certbot in standalone mode +CMD ["certbot", "renew", "--standalone", "--non-interactive", "--agree-tos", "--email", "jb@truckwash.dk", "--no-eff-email"] \ No newline at end of file diff --git a/services/nginx/Dockerfile b/services/nginx/Dockerfile index 08984e13..4f8513ba 100644 --- a/services/nginx/Dockerfile +++ b/services/nginx/Dockerfile @@ -2,7 +2,7 @@ FROM nginx:1.27.3-alpine # Import the configuration file for Nginx -COPY nginx.conf /etc/nginx/nginx.conf +COPY /nginx/nginx.conf /etc/nginx/nginx.conf # Copy the contents of the /app directory to the /var/www/html directory (This is not necessary for this, since we are using PHP and Nginx in separate containers - And we are not using Nginx to serve static files) #COPY /app /var/www/html