Manual Server Setup
Basic Dependency Stack
Section titled “Basic Dependency Stack”To fully launch the server, you need to start four basic services. Let’s do this locally:
sama-server
- core API service.sama-client
- frontend Web application.sama-push-daemon
- push notifications service.sama-push-queue-board
- web dashboard to monitor push notifications service queue.
sama-server
Section titled “sama-server”-
Make sure you have Node 18 installed.
-
Clone the repo.
Terminal window git clone git@github.com:SAMA-Communications/sama-server.gitcd sama-server -
Create env file from the template.
Terminal window cp .env.example .env -
For run dependant services (MongoDB, Minio, Redis) run:
Terminal window docker-compose up -
Open http://localhost:9011/access-keys and login using
MINIO_ROOT_USER
andMINIO_ROOT_PASSWORD
fromdocker-compose.yml
file. Create Access Keys and setMINIO_ACCESS_KEY
andMINIO_SECRET_KEY
in.env
file. -
Terminal window npm install to install dependencies -
Run DB migrations.
Terminal window npm run migrate-mongo-up -
Run server.
Terminal window npm run start
sama-client
Section titled “sama-client”-
Clone the repo.
Terminal window git clone git@github.com:SAMA-Communications/sama-client.gitcd sama-client -
Create env file from the template.
Terminal window cp .env.example .env -
Generate VAPID keys via
Terminal window npx web-push generate-vapid-keysAnd set Public Key to
REACT_APP_PUBLIC_VAPID_KEY
in .env file -
Install dependencies.
Terminal window npm install -
Run server.
Terminal window npm run start -
access http://localhost:3000 in your browser
sama-push-deamon
Section titled “sama-push-deamon”-
Clone the repo.
Terminal window git clone git@github.com:SAMA-Communications/sama-push-deamon.gitcd sama-push-deamon -
Create env file from the template.
Terminal window cp .env.example .env -
From the previous step when you generated VAPID keys, set Public Key to
PUBLIC_VAPID_KEY
and Private Key toPRIVATE_VAPID_KEY
in.env
file -
Install dependencies.
Terminal window npm install -
Run server.
Terminal window npm run start
sama-push-queue-board
Section titled “sama-push-queue-board”-
Clone the repo.
Terminal window git clone git@github.com:SAMA-Communications/sama-push-queue-board.gitcd sama-push-queue-board -
Create env file from the template.
Terminal window cp .env.example .env -
Install dependencies.
Terminal window npm install -
Run server.
Terminal window npm run start -
Access http://localhost:3000/ui
-
Done.