Add limesurvey

This commit is contained in:
Mo 2022-09-14 00:28:13 +02:00
parent 72dc7c9cea
commit 2936193558
2 changed files with 45 additions and 10 deletions

40
containers/limesurvey.fish Executable file
View 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

View file

@ -31,14 +31,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:
@ -65,9 +62,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