mirror of
https://codeberg.org/Mo8it/AdvLabDB.git
synced 2024-09-19 18:31:16 +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
|
@ -159,13 +159,13 @@ def create_traefik_container():
|
||||||
print("Creating container traefik.")
|
print("Creating container traefik.")
|
||||||
create_container(
|
create_container(
|
||||||
"traefik",
|
"traefik",
|
||||||
f"""--label "io.containers.autoupdate=registry" \
|
f"""--network {args.network} \
|
||||||
--network {args.network} \
|
|
||||||
-p 80:80 \
|
-p 80:80 \
|
||||||
-p 443:443 \
|
-p 443:443 \
|
||||||
-v {TRAEFIK_ETC_DIR}:/etc/traefik:ro:Z,ro \
|
-v {TRAEFIK_ETC_DIR}:/etc/traefik:ro:Z,ro \
|
||||||
-v {TRAEFIK_LOGS_DIR}:/volumes/logs:Z \
|
-v {TRAEFIK_LOGS_DIR}:/volumes/logs:Z \
|
||||||
-v {TRAEFIK_CERTS_DIR}:/volumes/certs:Z \
|
-v {TRAEFIK_CERTS_DIR}:/volumes/certs:Z \
|
||||||
|
--label "io.containers.autoupdate=registry" \
|
||||||
docker.io/library/traefik:latest""",
|
docker.io/library/traefik:latest""",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -174,9 +174,9 @@ def create_nginx_container():
|
||||||
print("Creating container nginx.")
|
print("Creating container nginx.")
|
||||||
create_container(
|
create_container(
|
||||||
"nginx",
|
"nginx",
|
||||||
f"""--label "io.containers.autoupdate=registry" \
|
f"""--network {args.network} \
|
||||||
--network {args.network} \
|
|
||||||
-v {NGINX_CONF_D_DIR}:/etc/nginx/conf.d:Z,ro \
|
-v {NGINX_CONF_D_DIR}:/etc/nginx/conf.d:Z,ro \
|
||||||
|
--label "io.containers.autoupdate=registry" \
|
||||||
docker.io/library/nginx:alpine""",
|
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…
Reference in a new issue