From 9e773c27b5f4e9b29b78f622398897e28e39180f Mon Sep 17 00:00:00 2001 From: budescode <gospeltruth18@gmail.com> Date: Tue, 6 Feb 2024 08:45:03 +0100 Subject: [PATCH] certbot domain added to .nginx file --- nginx/Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nginx/Dockerfile b/nginx/Dockerfile index 01599f4..274ff6f 100644 --- a/nginx/Dockerfile +++ b/nginx/Dockerfile @@ -1,6 +1,10 @@ FROM nginx:latest COPY nginx.conf /etc/nginx/conf.d/default.conf +# Copy the .env file into the container +COPY /code/.env /etc/nginx/conf.d/.env +# Set environment variables based on the values in the .env file +ENV SERVER_NAME=$(cat /etc/nginx/.env | grep CERTBOT_DOMAIN | cut -d '=' -f 2) EXPOSE 80