Init nginx and traefik for paladin

This commit is contained in:
Joey Hafner 2023-10-05 11:26:39 -07:00
parent b03b63ab62
commit 6bd33a909b
7 changed files with 101 additions and 0 deletions

View File

@ -0,0 +1,14 @@
version: '3'
services:
nginx:
image: nginx
container_name: nginx_test
networks:
- web
labels:
- traefik.http.routers.nginx.rule=Host(`nginx.druid.jafner.net`)
- traefik.http.routers.nginx.tls.certresolver=lets-encrypt
networks:
web:
external: true

View File

@ -0,0 +1 @@
DOCKER_DATA=/home/admin/data/traefik

View File

@ -0,0 +1,27 @@
http:
middlewares:
lan-only:
ipWhiteList:
sourceRange:
- "127.0.0.1/32"
- "192.168.1.1/24"
securityheaders:
headers:
customResponseHeaders:
X-Robots-Tag: "none,noarchive,nosnippet,notranslate,noimageindex"
server: ""
sslProxyHeaders:
X-Forwarded-Proto: https
referrerPolicy: "same-origin"
hostsProxyHeaders:
- "X-Forwarded-Host"
customRequestHeaders:
X-Forwarded-Proto: "https"
X-Scheme: https
contentTypeNosniff: true
browserXssFilter: true
forceSTSHeader: true
stsIncludeSubdomains: true
stsSeconds: 63072000
stsPreload: true

View File

@ -0,0 +1,4 @@
tls:
options:
tls12:
minVersion: VersionTLS12

View File

@ -0,0 +1,8 @@
http:
routers:
api:
rule: "Host(`traefik.druid.jafner.net`)"
entryPoints: "websecure"
service: "api@internal"
tls:
certResolver: "lets-encrypt"

View File

@ -0,0 +1,19 @@
version: "3"
services:
traefik:
container_name: traefik_traefik
image: traefik:latest
restart: "no"
networks:
- web
ports:
- 80:80
- 443:443
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./traefik.yaml:/traefik.yaml
- ./config:/config
- $DOCKER_DATA/acme.json:/acme.json
networks:
web:
external: true

View File

@ -0,0 +1,28 @@
entryPoints:
web:
address: :80
http:
redirections:
entryPoint:
to: websecure
scheme: https
websecure:
address: :443
certificatesResolvers:
lets-encrypt:
acme:
email: jafner425@gmail.com
storage: acme.json
tlsChallenge: {}
api:
insecure: true
dashboard: true
providers:
docker:
watch: true
network: web
file:
directory: /config