Skip to content

Lab-Lab-Lab/CPR-Music

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CPR-Music

This is the frontend for MusicCPR.org

Deploying

  1. tag the version git tag <whatever, e.g. v0.2.2>
  2. push the tag git push origin <whatever, e.g. v0.2.2>
  3. on the server, get to the main repo root e.g. cd ~/MusicCPRFrontEndDev
  4. pull on server git pull
  5. checkout a new worktree for the recently pushed/fetched/tagged version git worktree add ../fe-dev-versions/v0.2.2 v0.2.2
  6. npm i #beware that probably we should not track package-lock.json nor yarn.lock since local and remote are different platforms and we depend on platform-specific tools /-:
  7. create .env.local and .env.production with content like this (and look at what we're using already on server)
    • SECRET=<RANDOM STRING>
  8. npm run build
  1. pm2 stop fe-dev
  2. change the symlink for live in fe-dev to the newly readied version
    • cd /home/ec2-user/fe-dev-versions
    • ls -al
    • rm live
    • ln -s /home/ec2-user/fe-dev-versions/<v0.2.2> live
  3. cd /home/ec2-user/fe-dev-versions/live #WARNING: you must have cd'ed into the current version first because the start script is just running next start which expects to find package.json and etc in the current dir.
  4. pm2 start npm --name "fe-dev" -- start pm2 start npm --name "fe-prod" -- start
  5. pm2 save

Deploying PROD

  1. package.json needs to specify the different port
    • change the start line in package.json to "start": "next start -p 3003"
  2. .env files may need to be copied from prior versions

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 98.6%
  • CSS 1.4%