diff --git a/Dockerfile b/Dockerfile index 70ecd01..1ee2319 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,10 @@ -FROM nginx:1.25.3 +FROM nginx:1.25.3-alpine3.18 -RUN apt-get update && apt-get install -y vim python3-certbot-nginx --fix-missing +RUN apk add --no-cache certbot certbot-nginx ADD nginx.conf /etc/nginx/nginx.conf ADD ssl /etc/nginx/ssl -RUN usermod -u 1000 www-data - CMD ["nginx"] WORKDIR /var/www/html diff --git a/nginx.conf b/nginx.conf index 02b94dd..9d5eb84 100644 --- a/nginx.conf +++ b/nginx.conf @@ -1,5 +1,4 @@ daemon off; -user www-data; worker_processes 4; pid /run/nginx.pid; @@ -32,7 +31,8 @@ http { # Symfony (Roadrunner) server { - listen 443 ssl http2; + listen 443 ssl; + http2 on; server_name endroid.nl; root /var/www/html/symfony/application/public; ssl_certificate /etc/nginx/ssl/server.crt; @@ -54,7 +54,8 @@ http { # Symfony (PHP-FPM) server { - listen 9000 ssl http2; + listen 9000 ssl; + http2 on; server_name endroid.nl; root /var/www/html/symfony/application/public; ssl_certificate /etc/nginx/ssl/server.crt; @@ -86,7 +87,8 @@ http { # Laravel (PHP-FPM) server { - listen 9100 ssl http2; + listen 9100 ssl; + http2 on; server_name endroid.nl; root /var/www/html/laravel/application/public; ssl_certificate /etc/nginx/ssl/server.crt; @@ -118,7 +120,8 @@ http { # Drupal (PHP-FPM) server { - listen 9200 ssl http2; + listen 9200 ssl; + http2 on; server_name endroid.nl; root /var/www/html/drupal/application/web; ssl_certificate /etc/nginx/ssl/server.crt; @@ -163,7 +166,8 @@ http { # NestJS (NodeJS) server { - listen 3000 ssl http2; + listen 3000 ssl; + http2 on; server_name endroid.nl; root /var/www/html/nestjs/application/public; ssl_certificate /etc/nginx/ssl/server.crt; @@ -185,7 +189,8 @@ http { # Flask (Python) server { - listen 5000 ssl http2; + listen 5000 ssl; + http2 on; server_name endroid.nl; root /var/www/html/flask/application/static; ssl_certificate /etc/nginx/ssl/server.crt; @@ -207,7 +212,8 @@ http { # Rocket (Rust) server { - listen 8000 ssl http2; + listen 8000 ssl; + http2 on; server_name endroid.nl; root /var/www/html/rocket/application/static; ssl_certificate /etc/nginx/ssl/server.crt;