-
-
Notifications
You must be signed in to change notification settings - Fork 63
01. Standard Setup Instructions
Derick M edited this page Aug 31, 2024
·
9 revisions
- Verify that Node is at version >=20 with
node -v
in the terminal - Verify npm is installed with
npm -v
- Verify yarn is installed with
yarn -v
If Node or npm is missing, install them again
If Yarn is missing:
sudo npm install -g yarn
ReactMap can utilize an unlimited number of databases but it's recommended to have at least 3. Both the ReactMap database and Manual database will need to be created manually before starting ReactMap
- Your scanner database; usually Chuck, MAD, or RDM (user needs at least read access)
- The ReactMap database; this is where ReactMap will make the tables it needs to run (user needs write access)
- The manual database (optional); this is where your 3rd party tool databases will be, such as nests and portals (user needs at least read access)
- Instructions
- It's best practice to create a separate user for each database
- Clone the repo
git clone https://github.com/WatWowMap/ReactMap.git
- Open up the directory (
cd ReactMap
) yarn install
- Create your config (
cp config/local.example.json server/src/configs/local.json
) - Fill out the config, only the database details are required but adding a
startLat
andstartLon
are recommended yarn start
Using yarn start
is a good way to test that everything is working, but once you deploy your map, you should continue reading below to setup either Docker or PM2.
-
ctrl
+c
git pull
yarn install
yarn start
- Follows steps 1 - 5 in the Standard Setup Section
This will quickly add ReactMap to your PM2 processes
sudo npm install -g pm2
- While in the ReactMap root folder
pm2 start ReactMap.js
This will give you a little more control over the ReactMap process, if desired
touch ecosystem.config.js
nano ecosystem.config.js
- Copy and paste the below:
module.exports = {
apps: [
{
name: 'ReactMap',
script: 'ReactMap.js',
cwd: '/home/your_username_here/ReactMap',
instances: 1,
cron_restart: '*/60 */24 * * 0',
exec_mode: "cluster",
autorestart: true,
max_memory_restart: '2G',
env_production: {
NODE_ENV: "production",
},
},
],
};
-
ctrl
+x
keys to exit, theny
to save when prompted pm2 start ecosystem.config.js
git pull
yarn install
pm2 restart ReactMap
- Use docker-compose.yml (
cp docker-compose.example.yml docker-compose.yml
) - Fill out the environment variables
- Full list of environment variable mappings can be found here
- Run
docker-compose up -d reactmap
docker-compose pull reactmap
docker-compose up -d reactmap