diff options
| author | toufic ar <contact@toufy.me> | 2026-07-11 16:40:59 +0300 |
|---|---|---|
| committer | toufic ar <contact@toufy.me> | 2026-07-11 16:40:59 +0300 |
| commit | 627971135bc4d8bb54284856be8c5e026e7933b8 (patch) | |
| tree | 4ed9d3ab858bd8a53e8033a2db16c197df40f405 /adonis/autopush | |
| parent | 46c7e8d98faa2bcaaf3676ae2bc2e400a4957432 (diff) | |
| download | servers-627971135bc4d8bb54284856be8c5e026e7933b8.tar.gz servers-627971135bc4d8bb54284856be8c5e026e7933b8.zip | |
reverse proxy for autoconnect
Diffstat (limited to 'adonis/autopush')
| -rw-r--r-- | adonis/autopush/default.nix | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/adonis/autopush/default.nix b/adonis/autopush/default.nix index 8da3b21..a142631 100644 --- a/adonis/autopush/default.nix +++ b/adonis/autopush/default.nix @@ -24,7 +24,7 @@ in { environment = { AUTOCONNECT__DB_DSN = "redis://127.0.0.1:${builtins.toString redisPort}"; AUTOCONNECT__ENDPOINT_SCHEME = "https"; - AUTOCONNECT__ENDPOINT_HOSTNAME = "${domain}"; + AUTOCONNECT__ENDPOINT_HOSTNAME = "update.${domain}"; AUTOCONNECT__ENDPOINT_PORT = builtins.toString endpointPort; AUTOCONNECT__ROUTER_HOSTNAME = "127.0.0.1"; }; @@ -39,7 +39,7 @@ in { AUTOEND__DB_DSN = "redis://127.0.0.1:${builtins.toString redisPort}"; AUTOEND__HOST = "0.0.0.0"; AUTOEND__PORT = builtins.toString port; - AUTOEND__ENDPOINT_URL = "https://${domain}"; + AUTOEND__ENDPOINT_URL = "https://update.${domain}"; }; wantedBy = ["multi-user.target"]; serviceConfig = { @@ -48,10 +48,14 @@ in { }; }; }; - services.nginx.virtualHosts.${domain} = { forceSSL = true; enableACME = true; + locations."/".proxyPass = "http://127.0.0.1:8080"; + }; + services.nginx.virtualHosts."update.${domain}" = { + forceSSL = true; + enableACME = true; locations."/".proxyPass = "http://127.0.0.1:${builtins.toString port}"; }; } |
