Added site configs; updated some stuff

pull/3/head
Jef Roosens 2021-01-05 13:26:59 +01:00
parent 102aaa59e4
commit da1df2e798
8 changed files with 43 additions and 11 deletions

View File

@ -1,8 +1,8 @@
http {
# SSL CONFIGURATION
# Key locations
ssl_certificate /etc/letsencrypt/live/karaoke.roosens.me/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/karaoke.roosens.me/privkey.pem;
ssl_certificate /etc/letsencrypt/live/your.domain.here/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/your.domain.here/privkey.pem;
# Allowed protocols
ssl_protocols TLSv1.2;
@ -21,5 +21,5 @@ http {
# LOAD SITES
include conf.d/sites_enabled/*.conf;
include sites_enabled/*.conf;
}

View File

@ -5,4 +5,4 @@ user nginx nginx;
worker_processes auto;
# Load config segments
include conf.d/http;
include conf.d/*;

View File

@ -0,0 +1,19 @@
server {
listen 443 ssl;
server_name PLACEHOLDER;
location / {
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-Host $server_name;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Ssl on;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
resolver 127.0.0.11;
proxy_pass http://firefly_app_1:8080;
}
}

View File

@ -0,0 +1,11 @@
server {
listen 443 ssl;
server_name PLACEHOLDER;
location / {
proxy_set_header Connection "upgrade";
resolver 127.0.0.11;
proxy_pass http://portainer_app_1:9000;
}
}

View File

@ -1,19 +1,23 @@
version: '3.5'
services:
nginx:
app:
build: './nginx'
image: 'nginx-certbot:stable-alpine'
env_file:
- 'nginx.env.example'
networks:
- 'nginx'
ports:
- '80:80'
- '443:443'
networks:
- 'nginx'
volumes:
- 'certs:/etc/letsencrypt'
- './config:/etc/nginx/conf.d'
networks:
nginx:
external: true
volumes:
certs:

View File

@ -1,8 +1,4 @@
#!/usr/bin/env sh
# Should be passed as env vars
# DOMAINS=suzy.roosens.me,next.roosens.me,tm.roosens.me
# EMAIL=roosensjef@gmail.com
certbot certonly --standalone -d "$DOMAINS" --email "$EMAIL" -n --agree-tos --expand
/usr/sbin/nginx -g "daemon off;"

View File

@ -9,6 +9,8 @@ services:
- 'com.centurylinklabs.watchtower.enable=true'
networks:
- 'nginx'
ports:
- '8000:8000'
volumes:
- '/var/run/docker.sock:/var/run/docker.sock'
- 'data:/data'