diff --git a/containers/collective-score-rust/collective-score-rust-db.container b/containers/collective-score-rust/collective-score-rust-db.container new file mode 100644 index 0000000..0c0a02f --- /dev/null +++ b/containers/collective-score-rust/collective-score-rust-db.container @@ -0,0 +1,15 @@ +[Container] +Image=docker.io/library/postgres:16 +AutoUpdate=registry +Network=collective-score-rust.network +Volume=%h/volumes/collective-score-rust/db:/var/lib/postgresql/data:Z + +EnvironmentFile=%h/volumes/collective-score-rust/.postgres.env +Environment=TZ=Europe/Berlin +Environment=PGTZ=Europe/Berlin + +[Service] +Restart=always + +[Install] +WantedBy=default.target diff --git a/containers/collective-score-rust/collective-score-rust.container b/containers/collective-score-rust/collective-score-rust.container new file mode 100644 index 0000000..a0d3303 --- /dev/null +++ b/containers/collective-score-rust/collective-score-rust.container @@ -0,0 +1,16 @@ +[Container] +Image=localhost/collective-score-rust:latest +AutoUpdate=registry +Network=traefik.network +Network=collective-score-rust.network +Volume=%h/volumes/collective-score-rust/config.toml:/volumes/config.toml:Z,ro + +[Unit] +Requires=collective-score-rust-db.service +After=collective-score-rust-db.service + +[Service] +Restart=always + +[Install] +WantedBy=default.target diff --git a/containers/collective-score-rust/collective-score-rust.fish b/containers/collective-score-rust/collective-score-rust.fish new file mode 100755 index 0000000..a12d226 --- /dev/null +++ b/containers/collective-score-rust/collective-score-rust.fish @@ -0,0 +1,3 @@ +#!/usr/bin/env fish + +buildah build -t collective-score-rust:latest ~/code/collective-score diff --git a/containers/collective-score-rust/collective-score-rust.network b/containers/collective-score-rust/collective-score-rust.network new file mode 100644 index 0000000..264f70a --- /dev/null +++ b/containers/collective-score-rust/collective-score-rust.network @@ -0,0 +1 @@ +[Network] diff --git a/volumes/traefik/dynamic.yml b/volumes/traefik/dynamic.yml index 056c329..e53292d 100644 --- a/volumes/traefik/dynamic.yml +++ b/volumes/traefik/dynamic.yml @@ -92,6 +92,9 @@ http: to_comprehensive_rust: rule: Host(`comprehensive-rust.mo8it.com`) service: comprehensive_rust + to_collective_score_rust: + rule: Host(`collective-score-rust.mo8it.com`) + service: collective_score_rust services: forgejo: @@ -150,3 +153,7 @@ http: loadBalancer: servers: - url: http://systemd-comprehensive-rust + collective_score_rust: + loadBalancer: + servers: + - url: http://systemd-collective-score-rust