Remove unnecessary app directory copy in Nginx Dockerfile

The COPY command for transferring /app to /var/www/html was commented out as it is redundant. Nginx is not being used to serve static files in this setup with separate PHP and Nginx containers. This helps avoid unnecessary actions and aligns the configuration with the intended architecture.
This commit is contained in:
Jepp9350
2025-01-29 15:29:32 +01:00
parent b97881ff05
commit 3f9e6310f4
+2 -2
View File
@@ -4,8 +4,8 @@ FROM nginx:1.27.3-alpine
# Import the configuration file for Nginx
COPY nginx.conf /etc/nginx/nginx.conf
# Copy the contents of the /app directory to the /var/www/html directory
COPY /app /var/www/html
# 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
# Expose port 80 (HTTP) and 443 (HTTPS)
EXPOSE 80 443