There are several ways to deploy. This is the 'most minimal' approach:
- Run
OUTPUT_DIR=./build yarn run prod-build-server
This will generate something you can deploy to production in ./build and run nodejs server/server/index.js - Run
yarn run prod-build-client
- Make a copy of
deploy/spoke-pm2.config.js.template
, e.g.spoke-pm2.config.js
, add missing environment variables, and run it with pm2, e.g.pm2 start spoke-pm2.config.js --env production
- Install PostgreSQL
- Start PostgreSQL (e.g.
sudo /etc/init.d/postgresql start
), connect (e.g.sudo -u postgres psql
), create a user and database (e.g.create user spoke password 'spoke'; create database spoke owner spoke;
), disconnect (e.g.\q
) and add credentials toDB_
variables in spoke-pm2.config.js