- Configure Nginx to use structured JSON access logs and add request ID headers. - Define upstream pool for PHP-FPM with load-balancing support. - Integrate Filebeat for log ingestion across Nginx and PHP logs. - Add `.env.example` and README for local TLS setup guidance. - Extend Dockerfile with PHP extensions (GD, Redis, etc.) and Composer dependency installs. - Add custom PHP configuration for Redis-backed session storage.
14 lines
495 B
Docker
14 lines
495 B
Docker
# NGINX Dockerfile
|
|
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 (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
|
|
|
|
# Start Nginx when the container starts
|
|
CMD ["nginx", "-g", "daemon off;"] |