Skip to main content

Overview

Geos is deployed using PM2 process manager on all nodes.

PM2 Commands

Check running processes:
pm2 list
Stop all processes:
pm2 stop all
Restart all processes:
pm2 restart all
View admin panel logs:
pm2 logs admin

Database Access

To access the MySQL database:
mysql -h geos-production-new.csqzdc49vgv3.eu-west-1.rds.amazonaws.com -u geos -p geos
Always use transactions and set autocommit to false when working with the database:
SET autocommit = 0;
START TRANSACTION;
-- Your queries here
-- COMMIT; or ROLLBACK; when done

Deploying Server and Indexer

To deploy the server and indexer services on geos-02 and geos-03:
  1. SSH into the node:
    ssh geos-02
    # or
    ssh geos-03
    
  2. Switch to deployer user:
    sudo su - deployer
    
  3. Navigate to the geos directory:
    cd ~/geos
    
  4. Start the server (port 3000):
    source $HOME/.nvm/nvm.sh && nvm exec pm2 --name=server start server.js -f -- -p 3000
    
  5. Start the indexer (port 4000):
    source $HOME/.nvm/nvm.sh && nvm exec pm2 --name=indexer start indexer.js -f -- -p 4000
    
  6. Verify services are running:
    pm2 list
    
The -f flag forces PM2 to start the process even if it’s already running. Use this when redeploying or restarting services.

Cache Refresh

To refresh Geos cache, you need to update the search API (Apache Solr) and refresh the cache on both server nodes (geos-02 and geos-03). See FAQ: How to refresh Geos cache? for detailed instructions.