Compare commits
3 commits
89a6015b68
...
8f384a93b2
Author | SHA1 | Date | |
---|---|---|---|
8f384a93b2 | |||
2936193558 | |||
72dc7c9cea |
4 changed files with 66 additions and 23 deletions
40
containers/limesurvey.fish
Executable file
40
containers/limesurvey.fish
Executable file
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/fish
|
||||
|
||||
set -l container_name limesurvey
|
||||
set -l container_volumes_dir ~/volumes/$container_name
|
||||
set -l container_limesurvey_dir $container_volumes_dir/limesurvey
|
||||
set -l limesurvey_env_file $container_volumes_dir/.limesurvey.env
|
||||
set -l postgres_env_file $container_volumes_dir/.postgres.env
|
||||
|
||||
if not test -f $limesurvey_env_file
|
||||
echo "$limesurvey_env_file missing"
|
||||
exit 1
|
||||
end
|
||||
|
||||
if not test -f $postgres_env_file
|
||||
echo "$postgres_env_file missing"
|
||||
exit 1
|
||||
end
|
||||
|
||||
mkdir -p $container_limesurvey_dir
|
||||
|
||||
set -l db_container_name limesurvey-postgres
|
||||
set -l db_container_dir $container_volumes_dir/postgres
|
||||
|
||||
mkdir -p $db_container_dir
|
||||
|
||||
podman-default-create \
|
||||
$db_container_name \
|
||||
--network traefik \
|
||||
-v $db_container_dir:/var/lib/postgresql/data:Z \
|
||||
--env-file $postgres_env_file \
|
||||
--label "io.containers.autoupdate=registry" \
|
||||
docker.io/library/postgres:alpine
|
||||
|
||||
podman-default-create \
|
||||
$container_name \
|
||||
--network traefik \
|
||||
-v $container_limesurvey_dir:/var/www/html/upload/surveys:Z \
|
||||
--env-file $limesurvey_env_file \
|
||||
--label "io.containers.autoupdate=registry" \
|
||||
docker.io/martialblog/limesurvey:5-apache
|
|
@ -1,12 +0,0 @@
|
|||
server {
|
||||
listen 80;
|
||||
server_name advlabdb.mo8it.xyz;
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
11
volumes/nginx/conf.d/zola-example.mo8it.xyz.conf
Normal file
11
volumes/nginx/conf.d/zola-example.mo8it.xyz.conf
Normal file
|
@ -0,0 +1,11 @@
|
|||
server {
|
||||
listen 80;
|
||||
server_name zola-example.mo8it.xyz;
|
||||
|
||||
location / {
|
||||
root /volumes/sites/zola-example.mo8it.xyz;
|
||||
index index.html;
|
||||
}
|
||||
|
||||
error_page 404 /404.html;
|
||||
}
|
|
@ -11,6 +11,11 @@ http:
|
|||
service: how_to_linux
|
||||
tls:
|
||||
certResolver: le
|
||||
to_zola_example:
|
||||
rule: Host(`zola-example.mo8it.xyz`)
|
||||
service: zola_example
|
||||
tls:
|
||||
certResolver: le
|
||||
to_advlabdb:
|
||||
rule: Host(`advlabdb.mo8it.xyz`)
|
||||
service: advlabdb
|
||||
|
@ -31,14 +36,11 @@ http:
|
|||
service: hedgedoc
|
||||
tls:
|
||||
certResolver: le
|
||||
{{ $max_ttyd_num := 14 }}
|
||||
{{ range $index, $num := until $max_ttyd_num }}
|
||||
to_ttyd{{ $num }}:
|
||||
rule: Host(`ttyd{{ $num }}.mo8it.xyz`)
|
||||
service: ttyd{{ $num }}
|
||||
to_limesurvey:
|
||||
rule: Host(`survey.mo8it.xyz`)
|
||||
service: limesurvey
|
||||
tls:
|
||||
certResolver: le
|
||||
{{ end }}
|
||||
|
||||
services:
|
||||
xueyue_li_art:
|
||||
|
@ -49,10 +51,14 @@ http:
|
|||
loadBalancer:
|
||||
servers:
|
||||
- url: http://nginx
|
||||
advlabdb:
|
||||
zola_example:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: http://nginx
|
||||
advlabdb:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: http://advlabdb-nginx
|
||||
gitea:
|
||||
loadBalancer:
|
||||
servers:
|
||||
|
@ -65,9 +71,7 @@ http:
|
|||
loadBalancer:
|
||||
servers:
|
||||
- url: http://hedgedoc:3000
|
||||
{{ range $index, $num := until $max_ttyd_num }}
|
||||
ttyd{{ $num }}:
|
||||
limesurvey:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: http://ttyd{{ $num }}:7681
|
||||
{{ end }}
|
||||
- url: http://limesurvey:8080
|
||||
|
|
Loading…
Reference in a new issue