Skip to content

Commit

Permalink
Migrate fullyhacks-qrms to EC2 (cirno)
Browse files Browse the repository at this point in the history
  • Loading branch information
diamondburned committed Feb 25, 2024
1 parent b281a45 commit 682b8e8
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 28 deletions.
4 changes: 4 additions & 0 deletions servers/cirno/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,7 @@ spookathon.acmcsuf.com {
blinktest.acmcsuf.com {
reverse_proxy * unix//run/christmasd-test/http.sock
}

fullyhacksqr.acmcsuf.com {
reverse_proxy * http://localhost:38574
}
24 changes: 24 additions & 0 deletions servers/cirno/services.nix
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,28 @@ in
http-addr = "unix://$RUNTIME_DIRECTORY/http.sock";
};
};

systemd.services."fullyhacks-qrms" =
let
tokenFile = <acm-aws/secrets/fullyhacks-token.txt>;
port = 38574;
in
{
enable = true;
description = "Fullyhacks QR Management System";
after = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "simple";
DynamicUser = true;
ReadOnlyPaths = [ tokenFile ];
StateDirectory = "fullyhacks-qrms";
};
script = ''
${pkgs.fullyhacks-qrms}/bin/fullyhacks-qrms \
--root-token-file "${tokenFile}" \
--addr ":${builtins.toString port}" \
--db "$STATE_DIRECTORY/database.db"
'';
};
}
4 changes: 0 additions & 4 deletions servers/cs306/caddy/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,3 @@ status.acmcsuf.com {
ics.acmcsuf.com {
reverse_proxy * unix//run/discord-ical-srv/http.sock
}

fullyhacksqr.acmcsuf.com {
reverse_proxy * http://localhost:38574
}
24 changes: 0 additions & 24 deletions servers/cs306/services.nix
Original file line number Diff line number Diff line change
Expand Up @@ -225,28 +225,4 @@ in
WorkingDirectory = "${sources.go-workshop}";
};
};

systemd.services."fullyhacks-qrms" =
let
tokenFile = <acm-aws/secrets/fullyhacks-token.txt>;
port = 38574;
in
{
enable = true;
description = "Fullyhacks QR Management System";
after = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "simple";
DynamicUser = true;
ReadOnlyPaths = [ tokenFile ];
StateDirectory = "fullyhacks-qrms";
};
script = ''
${pkgs.fullyhacks-qrms}/bin/fullyhacks-qrms \
--root-token-file "${tokenFile}" \
--addr ":${builtins.toString port}" \
--db "$STATE_DIRECTORY/database.db"
'';
};
}

0 comments on commit 682b8e8

Please sign in to comment.