From f7350599b94d55432cb6cf83cdb8c016cc2ce0b1 Mon Sep 17 00:00:00 2001 From: Glen Whitney Date: Tue, 16 Apr 2024 00:49:12 -0700 Subject: [PATCH] doc: Start a page concerning server administration Resolves #274. --- doc/server-administration.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 doc/server-administration.md diff --git a/doc/server-administration.md b/doc/server-administration.md new file mode 100644 index 00000000..26aa5671 --- /dev/null +++ b/doc/server-administration.md @@ -0,0 +1,29 @@ +# Server administration + +This page serves as a guide for Numberscope maintainers concerning the +structure and deployment of the frontscope front end on a production server, +currently numberscope.colorado.edu. + +## Organization + +On the server machine, there is a dedicated Numberscope user (currently +`scope`). In the home directory of that user, there is a subdirectory `repos` +which contains a clone of the `frontscope` repository. + +The nginx `numberscope.conf` file maintained and installed by the +[backscope repository](https://github.com/numberscope/backscope) configures +the production web server to (by default) serve files directly from the `dist` +subdirectory of the frontscope clone in the location described by the previous +paragraph. + +Hence, when administering the server, be wary that changes to the dist +subdirectory of the frontscope clone go live instantly. + +## How to deploy a new version of frontscope + +1. Log into the numberscope server and `cd ~scope/repos/frontscope`. +2. Execute `sudo -u scope git pull`. +3. Execute `sudo -u scope npm install`. +4. Execute `sudo -u scope npm run build`. +5. Check that the numberscope front end at the primary server URL is working + and serving the updated version of Numberscope.