To install nvm see e.g. https://www.freecodecamp.org/news/node-version-manager-nvm-install-guide/
Execute in the project directory:
nvm install 20.19.6
nvm use
npm install
and install all dependencies.
-
Install Docker on your local machine
-
Start all containers using docker compose:
docker compose up -d
This starts:
- PostgreSQL (zuugle-container) on port
5433 - Valkey Cache (zuugle-valkey) on port
6379
- PostgreSQL (zuugle-container) on port
-
Verify the containers are running:
docker ps
You should see
zuugle-containerandzuugle-valkeyin the list.
Note: For UAT environment with two PostgreSQL instances, use
docker compose -f docker-compose.uat.yaml up -dinstead.
Create a copy of each connection file and rename it. We need two "knexfile*" files:
cp ./src/knexfileTourenDb.js.example ./src/knexfileTourenDb.js
cp ./src/knexfile.js.example ./src/knexfile.js
First, build the project:
npm run buildThen choose one of these options:
Option 1: Automatic download (recommended)
Downloads the dump file and imports it in one step:
npm run import-data-docker-downloadOption 2: Manual download
-
Download the dump file: https://uat-dump.zuugle.at/zuugle_postgresql.dump
-
Save it to the project root as
zuugle_postgresql.dump -
Run the import:
npm run import-data-docker
Start API locally:
npm run start
And in a new terminal start the update script:
npm run import-files
npm run start
Hint: On local environment using the function
logger('anytext');writes to the fileapi.login yourzuugle-api/directory. This is helpful when debugging SQL code, etc.
Stop all containers:
docker compose down
Start containers again:
docker compose up -d
View logs:
docker compose logs -f
Follow the steps described at https://github.com/bahnzumberg/zuugle-suchseite#zuugleat-suchseite