Basically my website, hosted at edm115.dev, real-time preview of the latest commit at next.edm115.dev)
Start :
git clone https://github.com/EDM115/website.git && cd website
pnpm i --frozen-lockfile
pnpm dev
Before commits :
pnpm format
pnpm lint:fix
Test builds :
pnpm build
pnpm start:ssr
Test the actual rendered builds :
pnpm generate
pnpm start:ssg
- Main website status :
- Netlify preview status :
- Main website (backup) status :
(supposing that the repo is at /home/edm115/website
and that it is built)
sudo find /home/edm115/website/dist -type d -exec chmod 755 {} \;
sudo find /home/edm115/website/dist -type f -exec chmod 644 {} \;
sudo chmod -R 755 /home/edm115/website/dist
sudo chmod -R 755 /home/edm115/website
In /etc/nginx/sites-available/default
:
server {
listen 443 ssl;
listen [::]:443 ssl;
# Only if you have a certificate
# Don't forget to also run sudo chmod -R 755 /home/edm115/.secure
ssl_certificate /home/edm115/.secure/cloudflare-origin-server.pem;
ssl_certificate_key /home/edm115/.secure/cloudflare-origin-server.key;
listen 80;
listen [::]:80;
include /etc/nginx/mime.types;
default_type application/octet-stream;
location / {
# Redirects to handle the hosted bots
# Hackish way to get the subdomains working with one IP
if ($host ~* ^jm-vps\.) {
proxy_pass http://127.0.0.1:9898;
break;
}
if ($host ~* ^dicewizard-vps\.) {
proxy_pass http://127.0.0.1:8686;
break;
}
if ($host ~* ^edm115-discord-vps\.) {
proxy_pass http://127.0.0.1:8888;
break;
}
if ($host ~* ^logs-vps\.) {
proxy_pass http://127.0.0.1:10000;
break;
}
if ($host ~* ^maps\.) {
proxy_pass http://127.0.0.1:27400;
}
if ($host ~* ^senescalade\.) {
return 301 https://github.com/EDM115-org/Senescalade;
}
if ($host ~* ^next\.) {
return 301 https://edm115.netlify.app$request_uri;
}
# Also pass URL params
if ($host ~* ^next\.) {
return 301 https://edm115.netlify.app$request_uri;
}
root /home/edm115/website/dist;
index index.html;
try_files $uri $uri/index.html /index.html;
}
}