Add my todo app to nixserver (It isn't done the right way yet)
This commit is contained in:
parent
ad155d0ebb
commit
a195740447
@ -109,7 +109,7 @@
|
||||
dnsProvider = "cloudflare";
|
||||
email = "cameron@cam123.dev";
|
||||
environmentFile = "/var/acme/secrets/.env";
|
||||
extraDomainNames = [ "jelly.cam123.dev" ];
|
||||
extraDomainNames = [ "jelly.cam123.dev" "todo.cam123.dev" ];
|
||||
};
|
||||
|
||||
|
||||
@ -134,6 +134,15 @@
|
||||
recommendedProxySettings = true;
|
||||
};
|
||||
};
|
||||
|
||||
"todo.cam123.dev" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "owl.cam123.dev";
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:8090";
|
||||
recommendedProxySettings = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@ -148,6 +157,22 @@
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services = {
|
||||
todo-web = {
|
||||
description = "Todo app";
|
||||
after = [ "network.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = "/opt/todo/todo-web -a 127.0.0.1 -p 8090 --db /opt/todo/prod.db --static /opt/todo/static";
|
||||
Type = "simple";
|
||||
Restart = "always";
|
||||
};
|
||||
|
||||
wantedBy = [ "default.target" ];
|
||||
requiredBy = [ "network.target" ];
|
||||
};
|
||||
};
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
|
Loading…
Reference in New Issue
Block a user