Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

Commit

Permalink
Use Alpine
Browse files Browse the repository at this point in the history
  • Loading branch information
endroid committed Nov 14, 2023
1 parent 214ccfa commit af96ce8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
22 changes: 14 additions & 8 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
daemon off;
user www-data;
worker_processes 4;
pid /run/nginx.pid;

Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit af96ce8

Please sign in to comment.