From 23b93acda3fce1f704fcf6534bbc089d9ecdf3af Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Fri, 8 Jan 2021 00:48:30 +0100 Subject: [PATCH] workadventure: works but without https --- .../configs/nixserver-host/workadventure.nix | 29 +++++++++++++++---- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/terranix/jitsi-cloud/plops/configs/nixserver-host/workadventure.nix b/terranix/jitsi-cloud/plops/configs/nixserver-host/workadventure.nix index b64b3ad..a585ac7 100644 --- a/terranix/jitsi-cloud/plops/configs/nixserver-host/workadventure.nix +++ b/terranix/jitsi-cloud/plops/configs/nixserver-host/workadventure.nix @@ -97,6 +97,23 @@ in { ]; }; + systemd.services.workadventure-network = { + enable = true; + wantedBy = [ "multi-user.target" ]; + script = '' + ${pkgs.docker}/bin/docker network create --driver bridge workadventure + ''; + after = [ "docker" ]; + before = [ + "docker-back.service" + "docker-maps.service" + "docker-messages.service" + "docker-prune.service" + "docker-uploader.service" + "docker-website.service" + ]; + }; + virtualisation.oci-containers.backend = "docker"; #virtualisation.oci-containers.containers.reverse-proxy = { @@ -150,7 +167,7 @@ in { #traefik.http.routers.front-ssl.tls=false #traefik.http.routers.front-ssl.service=front ''; - in [ "--label-file" (toString labelFile) ]; + in [ "--label-file" (toString labelFile) "--network=workadventure" ]; }; systemd.services.docker-front.serviceConfig = { StandardOutput = lib.mkForce "journal"; @@ -202,7 +219,7 @@ in { #traefik.http.routers.pusher-ssl.service=pusher #traefik.http.middlewares.api.headers.customResponseHeaders.Access-Control-Allow-Origin=http://play.${domain} ''; - in [ "--label-file" (toString labelFile) ]; + in [ "--label-file" (toString labelFile) "--network=workadventure" ]; }; systemd.services.docker-pusher.serviceConfig = { StandardOutput = lib.mkForce "journal"; @@ -240,7 +257,7 @@ in { #traefik.http.routers.maps-ssl.tls=false #traefik.http.routers.maps-ssl.service=maps ''; - in [ "--label-file" (toString labelFile) ]; + in [ "--label-file" (toString labelFile) "--network=workadventure" ]; }; systemd.services.docker-maps.serviceConfig = { StandardOutput = lib.mkForce "journal"; @@ -283,7 +300,7 @@ in { #traefik.http.routers.back-ssl.service=back #traefik.http.middlewares.api.headers.customResponseHeaders.Access-Control-Allow-Origin=http://play.${domain} ''; - in [ "--label-file" (toString labelFile) ]; + in [ "--label-file" (toString labelFile) "--network=workadventure" ]; }; systemd.services.docker-back.serviceConfig = { StandardOutput = lib.mkForce "journal"; @@ -318,7 +335,7 @@ in { #traefik.http.routers.uploader-ssl.tls=true #traefik.http.routers.uploader-ssl.service=uploader ''; - in [ "--label-file" (toString labelFile) ]; + in [ "--label-file" (toString labelFile) "--network=workadventure" ]; }; systemd.services.docker-uploader.serviceConfig = { StandardOutput = lib.mkForce "journal"; @@ -353,7 +370,7 @@ in { #traefik.http.routers.website-ssl.tls=true #traefik.http.routers.website-ssl.service=website ''; - in [ "--label-file" (toString labelFile) ]; + in [ "--label-file" (toString labelFile) "--network=workadventure" ]; }; systemd.services.docker-website.serviceConfig = { StandardOutput = lib.mkForce "journal";