Skip to content

Commit

Permalink
docs (readme): add build and deployment details
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenHulme committed Jun 20, 2024
1 parent 13ca34b commit 99d86f5
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down

0 comments on commit 99d86f5

Please sign in to comment.