diff options
author | Kjetil Orbekk <kj@orbekk.com> | 2022-12-28 19:24:03 -0500 |
---|---|---|
committer | Kjetil Orbekk <kj@orbekk.com> | 2022-12-28 19:24:19 -0500 |
commit | 61633d1c8e2c746adc681ecb04658abb5f02a195 (patch) | |
tree | 21d6a1ff2cbdf275a0a7173ee6322a12d758c116 | |
parent | 2028764504d6a69cef9be4efa51f7043586cadd4 (diff) |
Forward webapp
-rw-r--r-- | modules/bridge.nix | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/modules/bridge.nix b/modules/bridge.nix index 6303266..a1c405a 100644 --- a/modules/bridge.nix +++ b/modules/bridge.nix @@ -29,7 +29,7 @@ with lib; OPENID_ISSUER_URL= "https://auth.orbekk.com/realms/test"; OPENID_CLIENT_ID= "test-client"; OPENID_CLIENT_SECRET= "secret"; - APP_URL = "https://bridge-nightly.orbekk.com"; + APP_URL = "https://bridge.orbekk.com"; DATABASE_URL = "postgres:///bridge_nightly"; RUST_LOG = "info"; }; @@ -37,13 +37,17 @@ with lib; serviceConfig = { User = "bridge_nightly"; Group = "bridge_nightly"; + EnvironmentFile = config.age.secrets.bridge-nighly.path; ExecStart = "/opt/bridge-nightly/profile/bin/server"; }; }; - # "bridge.orbekk.com" = template // { - # locations."/".proxyPass = "http://${bridge_loc.host}:${toString bridge_loc.port}"; - # }; + services.nginx.virtualHosts."bridge.orbekk.com" = { + enableACME = true; + forceSSL = true; + root = "/opt/bridge-nightly/profile"; + locations."/api".proxyPass = "http://localhost:${toString cfg.port}"; + }; services.postgresql = { enable = true; |