Note: On Windows, both projects need to be checked out with, git config core.autocrlf input or they won't build correctly.
One of our dependencies is @eurofurence/reg-component-library, which we only publish to the private GitHub packages
registry.
To configure access, obtain a GitHub personal access token with read:packages scope permissions. With that, do
echo "//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}" >> ~/.npmrcThe node snap is just ... broken in weird ways. You need to install node the old-fashioned way.
Installing gyp may fail during npm install because it detects you have python, but on Ubuntu python either points to really old python2, or for newer Ubuntu releases, wonderfully does not work at all. There's a fix, so python points to python3.
sudo apt-get install python-is-python3Then it also fails to properly report missing build utilities, but some node packages expect certain build tools.
sudo apt-get install build-essentialnpm install -g gatsby-cli
gatsby telemetry --disable
npm installNote: running node/npm from snaps may not work. Some problem with user detection when installing sharp, where it tries to install as the wrong user and then runs into permission errors.
cp .example.env.development .env.developmentEdit this new file and fill in the env vars with the test env information.
If you have biome in your path, then npm run format will fix any formatting problems for you and avoid lots of spurious
changes. Please run it before creating a PR.
Install biome with
npm install -g biomeWith this, the IntelliJ biome plugin should also work, including auto-format on save.
VSCode is auto-configured, see .vscode.
npm startThen point your browser to http://localhost:8000/register
You can run locally together with one or more of the backend services (most likely you'll want at least reg-attendee-service and reg-payment-service).
See the instructions here, as well as the readme's of the backend services.
Then you can use the system exactly as it is installed on the server by pointing your browser to http://localhost:10000/register
This also lets you avoid any CORS issues because everything is coming from the same domain.
In gatsby-config.js, set the correct pathPrefix. Then do
PREFIX_PATHS=true npm run buildThis will generate a full static version of the site into public, which you can then tar.gz and upload to the server
for roll-out with a script similar to this one (assuming you have ssh-agent running and have access):
# build application with prefix paths as configured
PREFIX_PATHS=true npm run build
# upload and roll out
tar czf public.tgz public
scp public.tgz regtest@reg.eurofurence.org:projects/
ssh regtest@reg.eurofurence.org -t "bash -l -c 'scripts/update-app.sh'"
rm -f public.tgz