From 99d86f5c099502eb8af10227d369e31e8c7881f2 Mon Sep 17 00:00:00 2001 From: Stephen Hulme Date: Thu, 20 Jun 2024 13:56:54 +0100 Subject: [PATCH] docs (readme): add build and deployment details --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index e7b1d643..7203a172 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,25 @@ npm run test:unit npm run test:e2e ``` +## Building + +To build the app for production, run: + +```shell +./compile-build.sh release.tar.gz dist +``` + +This runs the npm build script and then compiles the build into a tarball, including the revision number. + +The build executes in `production` [mode by default](https://vitejs.dev/guide/env-and-mode#modes) and includes environment variables from the `.env.production` file. +Environment variables not specified in the `.env.production` file will fall back to values in the `.env` file if they exist. + +## Deployment + +Deployment is handled by the Deployment project, as usual, however it should be noted that context-specific environment variables undergo a string replacement process during deployment. All environment variables with the prefix `REPLACE_` are replaced with the corresponding values in the Deployment project at deployment time using GNU `awk`'s `gsub` function. + +As of June 2024, Quanthub is hosted on the SS load balancers. + ## Notes A predefined list of printers is used for the printer selection dropdown. This list is defined in the file `src/config/printers.json`. Additional printers, such as the logging printer `stub`, can be added to this list by setting the environment variable `VITE_CUSTOM_PRINTERS` to a comma-separated list of printer names, e.g. `VITE_CUSTOM_PRINTERS=stub,printer1,printer2`.