Use new Nginx setup
This commit is contained in:
parent
ce3b0156f0
commit
48de8efff9
8 changed files with 52 additions and 47 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
|
@ -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
20
containers/juna_li.fish
Executable 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
|
|
@ -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
|
||||
|
|
|
@ -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
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue