Skip to content

Commit c284a21

Browse files
committed
start updating readme for new deploy
1 parent 9b98738 commit c284a21

1 file changed

Lines changed: 7 additions & 32 deletions

File tree

README.md

Lines changed: 7 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,13 @@
22
This is the frontend for MusicCPR.org
33

44
# Deploying
5-
1. tag the version `git tag <whatever, e.g. v0.2.2>`
6-
1. push the tag `git push origin <whatever, e.g. v0.2.2>`
7-
1. on the server, get to the main repo root e.g. `cd ~/MusicCPRFrontEndDev`
8-
1. pull on server `git pull`
9-
1. checkout a new worktree for the recently pushed/fetched/tagged version `git worktree add ../fe-dev-versions/v0.2.2 v0.2.2`
10-
1. 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 /-:
11-
1. create .env.local and .env.production with content like this (and look at what we're using already on server)
12-
- `SECRET=<RANDOM STRING>`
13-
1. npm run build
14-
<!-- 1. `npm run dev` -->
15-
<!--
16-
1. If you push to main, it will re-deploy to dev.tele.band
17-
* the continuous deploy setup was created following [the steps detailed here](https://itnext.io/deploy-next-js-apps-using-github-actions-6322261757bc)
18-
* if the dev site loads, but fails to permit login, possibly the server's `.env.local` was removed/doesn't exist
19-
* beware: it seems that sometimes some pushed commits do not trigger the action 🤷
20-
-->
21-
1. `pm2 stop fe-dev`
22-
1. change the symlink for live in fe-dev to the newly readied version
23-
* cd /home/ec2-user/fe-dev-versions
24-
* ls -al
25-
* rm live
26-
* ln -s /home/ec2-user/fe-dev-versions/<v0.2.2> live
27-
1. 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.
28-
1. `pm2 start npm --name "fe-dev" -- start`
29-
`pm2 start npm --name "fe-prod" -- start`
30-
1. `pm2 save`
31-
32-
## Deploying PROD
33-
34-
1. package.json needs to specify the different port
35-
* change the `start` line in package.json to `"start": "next start -p 3003"`
36-
1. .env files may need to be copied from prior versions
5+
6+
only dev right now
7+
8+
## Dev
9+
10+
1. `wrangler login`
11+
2. `npm run deploy`
3712

3813

3914
## GitHub Container Registry (GHCR)

0 commit comments

Comments
 (0)