mirror of
https://github.com/2martens/cloud-configuration.git
synced 2026-10-17 08:37:56 +02:00
feat: Add deployment to Docker swarm
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
FROM nginx:mainline-alpine
|
||||
|
||||
COPY nginx.conf /etc/nginx/nginx.conf
|
||||
COPY paths-enabled /etc/nginx/paths-enabled.d
|
||||
@@ -0,0 +1,31 @@
|
||||
user nginx;
|
||||
worker_processes auto;
|
||||
events { worker_connections 1024; }
|
||||
http {
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
access_log /var/log/nginx/access.log;
|
||||
error_log /var/log/nginx/error.log;
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
# HTTP -> HTTPS redirect
|
||||
server {
|
||||
listen 80;
|
||||
server_name api.2martens.de;
|
||||
location /.well-known/acme-challenge/ { root /var/www/certbot; }
|
||||
location / { return 301 https://$host$request_uri; }
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name api.2martens.de;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/api.2martens.de/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/api.2martens.de/privkey.pem;
|
||||
|
||||
include /etc/nginx/paths-enabled.d/*.conf;
|
||||
|
||||
location / { return 404; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
location /wahlrecht/ {
|
||||
proxy_pass http://wahlrecht:12000/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
Reference in New Issue
Block a user