- Install Java version 17 (current production is running on 17.0.1)
- Install Postgres 12
- Create database user
create user commengage with password 'password' createrole
- Create a database with above user as owner
create database commengage with owner commengage
- Install UUID generator extension
create extension if not exists "uuid-ossp"
Command 3-5 can be run via postgres user/role.
- Download the jar from - https://github.com/SamanvayOrg/comm-engage/releases/download/0.1/server-0.0.1-SNAPSHOT.jar
- Define environment variable
export QRD_AUTH_TOKEN=TOKEN_VALUE
- Define environment variable
export COMMENGAGE_MAIN_CRON="0 0 * * * *"
This will make the data download run every hour. You can change the cron express to run it whenever you need it.
We want to make sure that the download is not happening when new QR codes are being defined. One way to make sure that this doesn't happen is to run the scheduled job only in the night.
In case you want to create a new build by making some changes to the code you can do the following. Postgres server needs to be running on your machine for running the build. For details please see the Makefile.
make build-server
make test-server
for running unit tests