Compare commits

...

2 commits

Author SHA1 Message Date
d0b7e7e33a Remove internet login to be rewritten in Rust 2023-08-27 23:58:48 +02:00
48de8efff9 Use new Nginx setup 2023-08-27 23:58:30 +02:00
9 changed files with 52 additions and 66 deletions

View file

@ -2,11 +2,14 @@
set -l container_name dev-tools
cd ~/code/dev_tools
mdbook build
buildah build --layers -t $container_name:latest .; or return 1
mkdir -p ~/volumes/$container_name
mdbook build -d ~/volumes/$container_name ~/code/dev_tools; or return 1
podman-default-create \
$container_name \
--network traefik \
localhost/$container_name:latest
-v ~/sync/volumes/nginx.conf:/etc/nginx/nginx.conf:z,ro \
-v ~/volumes/$container_name:/usr/share/nginx/html:Z,ro \
--label "io.containers.autoupdate=registry" \
docker.io/library/nginx:alpine

View file

@ -1,11 +1,11 @@
#!/usr/bin/env fish
set -l container_name julia_course_export
set -l container_volume ~/code/julia_course_export
set -l container_name how-2-julia
podman-default-create \
$container_name \
--network traefik \
-v $container_volume:/usr/share/nginx/html:Z,ro \
-v ~/sync/volumes/nginx.conf:/etc/nginx/nginx.conf:z,ro \
-v ~/code/how_2_julia:/usr/share/nginx/html:Z,ro \
--label "io.containers.autoupdate=registry" \
docker.io/library/nginx:alpine

View file

@ -1,19 +0,0 @@
#!/usr/bin/env fish
set -l container_name internet-login
set -l container_volumes_dir ~/volumes/$container_name
buildah rm builder &>/dev/null
buildah from --pull --name builder registry.fedoraproject.org/fedora:latest
buildah run builder -- dnf upgrade -y
buildah run builder -- dnf install -y iputils
buildah run builder -- dnf autoremove -y
buildah run builder -- dnf clean all
buildah commit --rm builder $container_name
podman-default-create \
$container_name \
-v $container_volumes_dir:/volumes/script:Z,ro \
localhost/$container_name:latest \
/volumes/script/login.sh monitor

View file

@ -1,10 +0,0 @@
#!/usr/bin/env fish
set -l container_name juna_li_com
buildah build --layers -t $container_name:latest ~/code/juna-li.com
podman-default-create \
$container_name \
--network traefik \
localhost/$container_name:latest

20
containers/juna_li.fish Executable file
View file

@ -0,0 +1,20 @@
#!/usr/bin/env fish
set -l container_name juna-li-com
mkdir -p ~/volumes/$container_name
podman run \
--rm \
-v ~/code/juna-li.com:/volumes/src:Z,ro \
-v ~/volumes/$container_name:/volumes/output:Z \
-w /volumes/src \
ghcr.io/getzola/zola:v0.17.2 build -o /volumes/output/public -f; or return 1
podman-default-create \
$container_name \
--network traefik \
-v ~/sync/volumes/nginx.conf:/etc/nginx/nginx.conf:z,ro \
-v ~/volumes/$container_name/public:/usr/share/nginx/html:Z,ro \
--label "io.containers.autoupdate=registry" \
docker.io/library/nginx:alpine

View file

@ -7,14 +7,14 @@ mkdir -p ~/volumes/$container_name
podman run \
--rm \
-v ~/code/mo8it.com:/volumes/src:Z,ro \
-v ~/volumes/$container_name:/volumes/public:Z \
-v ~/volumes/$container_name:/volumes/output:Z \
-w /volumes/src \
ghcr.io/getzola/zola:v0.17.2 build -o /volumes/public -f; or return 1
ghcr.io/getzola/zola:v0.17.2 build -o /volumes/output/public -f; or return 1
podman-default-create \
$container_name \
--network traefik \
-v ~/sync/volumes/nginx.conf:/etc/nginx/nginx.conf:z,ro \
-v ~/volumes/$container_name:/usr/share/nginx/html:Z,ro \
-v ~/volumes/$container_name/public:/usr/share/nginx/html:Z,ro \
--label "io.containers.autoupdate=registry" \
docker.io/library/nginx:alpine

View file

@ -1,12 +0,0 @@
#!/usr/bin/env fish
set -l container_name nginx
set -l container_volumes_dir ~/volumes/$container_name
podman-default-create \
$container_name \
--network traefik \
-v $container_volumes_dir/sites:/volumes/sites:z,ro \
-v ~/sync/volumes/$container_name/conf.d:/etc/nginx/conf.d:Z,ro \
--label "io.containers.autoupdate=registry" \
docker.io/library/nginx:alpine

View file

@ -2,9 +2,19 @@
set -l container_name yinghong-massage-de
buildah build --layers -t $container_name:latest ~/code/yinghong-massage.de
mkdir -p ~/volumes/$container_name
podman run \
--rm \
-v ~/code/yinghong-massage.de:/volumes/src:Z,ro \
-v ~/volumes/$container_name:/volumes/output:Z \
-w /volumes/src \
ghcr.io/getzola/zola:v0.17.2 build -o /volumes/output/public -f; or return 1
podman-default-create \
$container_name \
--network traefik \
localhost/$container_name:latest
-v ~/sync/volumes/nginx.conf:/etc/nginx/nginx.conf:z,ro \
-v ~/volumes/$container_name/public:/usr/share/nginx/html:Z,ro \
--label "io.containers.autoupdate=registry" \
docker.io/library/nginx:alpine

View file

@ -21,11 +21,6 @@ http:
regex: "^(https://[a-z-]+\\.mo8it\\.)xyz(.*)"
replacement: "${1}com${2}"
permanent: true
xueyue_li_art_to_juna_li_com:
redirectRegex:
regex: "^https://(www\\.)?xueyue-li\\.art(.*)"
replacement: "https://juna-li.com${2}"
permanent: true
oxiform_ratelimit:
rateLimit:
average: 2
@ -44,9 +39,8 @@ http:
routers:
to_juna_li_com:
rule: Host(`juna-li.com`) || Host(`www.juna-li.com`) || Host(`xueyue-li.art`)|| Host(`www.xueyue-li.art`)
rule: Host(`juna-li.com`) || Host(`www.juna-li.com`)
middlewares:
- xueyue_li_art_to_juna_li_com
- remove_www_juna_li_com
service: juna_li_com
to_advlabdb:
@ -91,9 +85,9 @@ http:
to_lldap:
rule: Host(`ldap.mo8it.com`)
service: lldap
to_julia_course_export:
rule: Host(`julia-course.mo8it.com`)
service: julia_course_export
to_how_2_julia:
rule: Host(`how-2-julia.mo8it.com`)
service: how_2_julia
to_oxiform:
rule: Host(`oxiform.mo8it.com`)
priority: 1
@ -177,10 +171,10 @@ http:
loadBalancer:
servers:
- url: http://lldap:17170
julia_course_export:
how_2_julia:
loadBalancer:
servers:
- url: http://julia_course_export
- url: http://how-2-julia
oxiform:
loadBalancer:
servers:
@ -196,7 +190,7 @@ http:
juna_li_com:
loadBalancer:
servers:
- url: http://juna_li_com
- url: http://juna-li-com
yinghong_massage_de:
loadBalancer:
servers: