https://github.com/desmos-labs/website
Repository of the official Desmos website
https://github.com/desmos-labs/website
nextjs react typescript website
Last synced: about 1 year ago
JSON representation
Repository of the official Desmos website
- Host: GitHub
- URL: https://github.com/desmos-labs/website
- Owner: desmos-labs
- Created: 2021-08-27T02:59:01.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-02-14T08:53:25.000Z (over 2 years ago)
- Last Synced: 2025-03-28T21:12:38.725Z (over 1 year ago)
- Topics: nextjs, react, typescript, website
- Language: TypeScript
- Homepage: https://desmos.network
- Size: 47 MB
- Stars: 1
- Watchers: 2
- Forks: 3
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Desmos
## Environment Variable Files
[Files on the left have more priority than files on the right:](https://create-react-app.dev/docs/adding-custom-environment-variables/#what-other-env-files-can-be-used)
`yarn start`: `.env.development.local`, `.env.local`, `.env.development`, `.env`
`yarn build`: `.env.production.local`, `.env.local`, `.env.production`, `.env`
## Development
1. Duplicate `./app/.env.development.local.example` to `./app/.env.development.local`
2. Update values within `.env.development.local` if necessary
3. Run `sh dev-up.sh`
4. Check the site at **localhost:4580**
## Setup on Server
Server should have Node 16, Yarn and PM2 installed.
1. Clone the project to the server
2. Duplicate `./app/.env.production.local.example` to `./app/.env.production.local`
3. Update `NEXT_PUBLIC_HOSTNAME` within `./app/.env.production.local`
4. `cd` to `./app`
5. 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.)
6. Run `yarn build`
7. Run `pm2 start yarn --name desmos -- start`
8. Run `pm2 save`
9. Update nginx config inside `/etc/nginx/sites-available` on the server to the same as `/nginx/nginx.conf` in this repo
10. Run `sudo systemctl restart nginx.service`
## Deployment
1. Run `git pull origin`
2. `cd` to `./app`
3. 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.)
4. Run `yarn build`
5. Run `pm2 restart desmos`
## Reminds
1. Environment variables should be prefixed with `NEXT_PUBLIC_`. otherwise `process.env` won't read them.