mirror of
https://codeberg.org/Mo8it/AdvLabDB.git
synced 2025-04-16 21:03:42 +00:00
Add Traefik and Nginx config files
This commit is contained in:
parent
f15653b4cd
commit
7d35991671
4 changed files with 68 additions and 4 deletions
podman
|
@ -159,13 +159,13 @@ def create_traefik_container():
|
|||
print("Creating container traefik.")
|
||||
create_container(
|
||||
"traefik",
|
||||
f"""--label "io.containers.autoupdate=registry" \
|
||||
--network {args.network} \
|
||||
f"""--network {args.network} \
|
||||
-p 80:80 \
|
||||
-p 443:443 \
|
||||
-v {TRAEFIK_ETC_DIR}:/etc/traefik:ro:Z,ro \
|
||||
-v {TRAEFIK_LOGS_DIR}:/volumes/logs:Z \
|
||||
-v {TRAEFIK_CERTS_DIR}:/volumes/certs:Z \
|
||||
--label "io.containers.autoupdate=registry" \
|
||||
docker.io/library/traefik:latest""",
|
||||
)
|
||||
|
||||
|
@ -174,9 +174,9 @@ def create_nginx_container():
|
|||
print("Creating container nginx.")
|
||||
create_container(
|
||||
"nginx",
|
||||
f"""--label "io.containers.autoupdate=registry" \
|
||||
--network {args.network} \
|
||||
f"""--network {args.network} \
|
||||
-v {NGINX_CONF_D_DIR}:/etc/nginx/conf.d:Z,ro \
|
||||
--label "io.containers.autoupdate=registry" \
|
||||
docker.io/library/nginx:alpine""",
|
||||
)
|
||||
|
||||
|
|
13
podman/nginx/conf.d/advlabdb.conf
Normal file
13
podman/nginx/conf.d/advlabdb.conf
Normal file
|
@ -0,0 +1,13 @@
|
|||
server {
|
||||
listen 80;
|
||||
# Uncomment following line and replace SERVER_NAME!
|
||||
# server_name SERVER_NAME;
|
||||
|
||||
location / {
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_redirect off;
|
||||
proxy_pass http://advlabdb;
|
||||
}
|
||||
}
|
15
podman/traefik/dynamic.yml
Normal file
15
podman/traefik/dynamic.yml
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
http:
|
||||
routers:
|
||||
to_advlabdb:
|
||||
# Uncomment following line and replace SERVER_NAME!
|
||||
# rule: Host(`SERVER_NAME`)
|
||||
service: advlabdb
|
||||
tls:
|
||||
certResolver: le
|
||||
|
||||
services:
|
||||
advlabdb:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: http://nginx
|
36
podman/traefik/traefik.yml
Normal file
36
podman/traefik/traefik.yml
Normal file
|
@ -0,0 +1,36 @@
|
|||
---
|
||||
global:
|
||||
checkNewVersion: false
|
||||
sendAnonymousUsage: true
|
||||
|
||||
log:
|
||||
filePath: /volumes/logs/traefik.log
|
||||
level: ERROR
|
||||
|
||||
entryPoints:
|
||||
web:
|
||||
address: :80
|
||||
http:
|
||||
redirections:
|
||||
entryPoint:
|
||||
to: websecure
|
||||
scheme: https
|
||||
|
||||
websecure:
|
||||
address: :443
|
||||
|
||||
certificatesResolvers:
|
||||
le:
|
||||
acme:
|
||||
# Uncomment following line and replace EMAIL!
|
||||
# email: EMAIL
|
||||
storage: /volumes/certs/acme.json
|
||||
tlsChallenge: {}
|
||||
|
||||
accessLog:
|
||||
filePath: /volumes/logs/access.log
|
||||
bufferingSize: 100
|
||||
|
||||
providers:
|
||||
file:
|
||||
filename: /etc/traefik/dynamic.yml
|
Loading…
Add table
Reference in a new issue