diff --git a/containers/collective_score_rust_server.fish b/containers/collective_score_rust_server.fish new file mode 100755 index 0000000..ac8dc41 --- /dev/null +++ b/containers/collective_score_rust_server.fish @@ -0,0 +1,26 @@ +#!/usr/bin/env fish + +set -l container_name collective-score-rust-server +set -l container_volumes_dir ~/volumes/$container_name + +buildah build -t $container_name:latest ~/code/collective-score + +set -l db_container_name collective-score-rust-server-db +set -l db_container_volumes_dir $container_volumes_dir/db +set -l db_env_file $container_volumes_dir/.postgres.env + +podman-default-create \ + $db_container_name \ + --network traefik \ + -v $db_container_volumes_dir:/var/lib/postgresql/data:Z \ + -e TZ=Europe/Berlin \ + -e PGTZ=Europe/Berlin \ + --env-file $db_env_file \ + --label "io.containers.autoupdate=registry" \ + docker.io/library/postgres:15-alpine + +podman-default-create \ + $container_name \ + --network traefik \ + -v $container_volumes_dir/data:/volumes/data:Z \ + localhost/$container_name:latest diff --git a/volumes/traefik/dynamic.yml b/volumes/traefik/dynamic.yml index 4f408ea..7913e7f 100644 --- a/volumes/traefik/dynamic.yml +++ b/volumes/traefik/dynamic.yml @@ -124,6 +124,9 @@ http: to_collective_score: rule: Host(`collective-score.mo8it.com`) service: collective_score + to_collective_score_rust: + rule: Host(`collective-score-rust.mo8it.com`) + service: collective_score_rust {{ $n_ttyds := 28 }} {{ range $index, $num := until $n_ttyds }} to_ttyd{{ $num }}: @@ -215,6 +218,10 @@ http: loadBalancer: servers: - url: http://collective-score-server + collective_score_rust: + loadBalancer: + servers: + - url: http://collective-score-rust-server {{ range $index, $num := until $n_ttyds }} ttyd{{ $num }}: loadBalancer: