Remove deploy dependence on Coded's computer
When we deploy, nginx resolves all of the hosts that are in its config.
Unfortunately, we were using the mDNS address for Coded's pi and PC so this was
dependent on them being up. This commit changes Coded's PI and PC to be in our
/etc/hosts file. A supporting change we have made is making these IPs static on
the router
Change-Id: Iefffe3a4100b8af6eab4548cf38a85109a826283
diff --git a/modules/networking.nix b/modules/networking.nix
index d7f17cf..8e97045 100644
--- a/modules/networking.nix
+++ b/modules/networking.nix
@@ -4,5 +4,8 @@
"127.0.0.2" = [ "clicks" ];
"127.0.0.3" = [ "caramels" ];
"127.0.0.255" = [ "generic" ];
+
+ "192.168.0.4" = [ "CodedPi" ];
+ "192.168.0.5" = [ "SamuelDesktop" ];
};
}
diff --git a/modules/nginx-routes.nix b/modules/nginx-routes.nix
index a7eb810..9a8534e 100644
--- a/modules/nginx-routes.nix
+++ b/modules/nginx-routes.nix
@@ -2,9 +2,9 @@
clicks.nginx.services = with helpers.nginx; [
(Host "signup.hopescaramels.com" (ReverseProxy "caramels:1024"))
(Host "freeflowtaekwondo.com" (ReverseProxy "generic:1026"))
- (Host "homebridge.coded.codes" (ReverseProxy "CodedPi.local:8581"))
- (Host "codedpc.coded.codes" (ReverseProxy "SamuelDesktop.local:3389"))
- (Host "testing.coded.codes" (ReverseProxy "SamuelDesktop.local:3000"))
+ (Host "homebridge.coded.codes" (ReverseProxy "CodedPi:8581"))
+ (Host "codedpc.coded.codes" (ReverseProxy "SamuelDesktop:3389"))
+ (Host "testing.coded.codes" (ReverseProxy "SamuelDesktop:3000"))
(Hosts [ "kavita.coded.codes" "reading.coded.codes" ]
(ReverseProxy "127.0.0.1:5000"))
(Host "clicks.codes" (ReverseProxy "127.0.0.1:3000"))
@@ -64,7 +64,7 @@
(Host "api.clicks.codes"
(Path "/nucleus/" (ReverseProxy "127.0.0.1:10000")))
(Host "api.coded.codes"
- (Path "/nucleus/" (ReverseProxy "SamuelDesktop.local:10000")))
+ (Path "/nucleus/" (ReverseProxy "SamuelDesktop:10000")))
(Host "coded.codes" (Compose [
(Path "/.well-known/matrix/"
(File ./nginx/coded.codes/.well-known/matrix))