Files on the left have more priority than files on the right:
yarn start
: .env.development.local
, .env.local
, .env.development
, .env
yarn build
: .env.production.local
, .env.local
, .env.production
, .env
- Duplicate
./app/.env.development.local.example
to./app/.env.development.local
- Update values within
.env.development.local
if necessary - Run
sh dev-up.sh
- Check the site at localhost:4580
Server should have Node 16, Yarn and PM2 installed.
- Clone the project to the server
- Duplicate
./app/.env.production.local.example
to./app/.env.production.local
- Update
NEXT_PUBLIC_HOSTNAME
within./app/.env.production.local
cd
to./app
- Run
yarn --ignore-engines
(Expected version "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0". Got "14.13.1". Since there is no LTS Nodejs version in these expected versions, we use--ignore-engines
to install the packages first, until a suitable LTS version has been released.) - Run
yarn build
- Run
pm2 start yarn --name desmos -- start
- Run
pm2 save
- Update nginx config inside
/etc/nginx/sites-available
on the server to the same as/nginx/nginx.conf
in this repo - Run
sudo systemctl restart nginx.service
- Run
git pull origin
cd
to./app
- Run
yarn --ignore-engines
(Expected version "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0". Got "14.13.1". Since there is no LTS Nodejs version in these expected versions, we use--ignore-engines
to install the packages first, until a suitable LTS version has been released.) - Run
yarn build
- Run
pm2 restart desmos
- Environment variables should be prefixed with
NEXT_PUBLIC_
. otherwiseprocess.env
won't read them.