Skip to main content

⏲️ PM2 configuration

Installation

Assuming you have a folder /home/[user]/services

Clone the project

cd /home/[user]/services && git clone https://github.com/louisgrasset/touitomamout.git

Install dependencies & build the project

npm ci && npm run build 

Define environment variables

3 types of environment variables are required to run the sync:

  • Core variables: required in situations, get them here.
  • Sync variables: required for the sync you want, get them here.
  • PM2 variables: required for the PM2 instance, get them here.
Environment file generator

Feel free to generate your .env file with the generator

Once your env variables are ready, inject them in a .env.[handle_to_sync] file. (e.g: .env.signalapp)

Run it!

Touitomamout comes with a script that will automatically handle the PM2 instances management for you.

Simply run the following command, and all your .env.[handle_to_sync] files will be used by PM2 to create a dedicated Touitomamout instance for each.

npm run pm2
I upgraded the project to the latest version, what should I do?

If you upgrade the project, you will need to update the PM2 instance(s) to use the latest version of the project. But that's as quick as running the following command:

npm run pm2:update