Init nginx and traefik for paladin
This commit is contained in:
parent
b03b63ab62
commit
6bd33a909b
14
paladin/config/nginx/docker-compose.yml
Normal file
14
paladin/config/nginx/docker-compose.yml
Normal 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
|
1
paladin/config/traefik/.env
Normal file
1
paladin/config/traefik/.env
Normal file
@ -0,0 +1 @@
|
||||
DOCKER_DATA=/home/admin/data/traefik
|
27
paladin/config/traefik/config/middlewares.yaml
Normal file
27
paladin/config/traefik/config/middlewares.yaml
Normal 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
|
||||
|
4
paladin/config/traefik/config/tls.yaml
Normal file
4
paladin/config/traefik/config/tls.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
tls:
|
||||
options:
|
||||
tls12:
|
||||
minVersion: VersionTLS12
|
8
paladin/config/traefik/config/traefik_api.yaml
Normal file
8
paladin/config/traefik/config/traefik_api.yaml
Normal file
@ -0,0 +1,8 @@
|
||||
http:
|
||||
routers:
|
||||
api:
|
||||
rule: "Host(`traefik.druid.jafner.net`)"
|
||||
entryPoints: "websecure"
|
||||
service: "api@internal"
|
||||
tls:
|
||||
certResolver: "lets-encrypt"
|
19
paladin/config/traefik/docker-compose.yml
Normal file
19
paladin/config/traefik/docker-compose.yml
Normal 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
|
28
paladin/config/traefik/traefik.yaml
Normal file
28
paladin/config/traefik/traefik.yaml
Normal 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
|
Loading…
Reference in New Issue
Block a user