Web Server: Difference between revisions

From Wreckroom
Jump to navigation Jump to search
No edit summary
 
(12 intermediate revisions by 3 users not shown)
Line 1: Line 1:
The Synology hosts [https://wreckroom.nyc https://wreckroom.nyc] over 443 using a NGINX Reverse Proxy via <code>localhost:3000</code>.
The Synology hosts [https://wreckroom.nyc https://wreckroom.nyc] over 443 using a NGINX Reverse Proxy via <code>localhost:3000</code>.
=Updating Copy to Website=
# Commit changes on GitHub
## app/page.js (replace text in the <code><Card /></code> components
## app/components/layout/Mission.js
# in terminal, execute
## <code>ssh userName@wreckroom.nyc</code>
## <code>cd /volume2/wreckroom.nyc/wreckroom.nyc</code>
## <code>git pull</code>
## <code>sudo pm2 delete all</code>
## <code>sudo pm2 start "npm run dev" -- start</code>
==PM2==
==PM2==


┌────┬────────────────────┬──────────┬──────┬───────────┬──────────┬──────────┐
'''PM2''' is a process manager that serves the [https://en.wikipedia.org/wiki/Npm npm] NextJS App [https://wreckroom.nyc https://wreckroom.nyc]
│ id │ name              │ mode    │ ↺    │ status    │ cpu      │ memory  │
├────┼────────────────────┼──────────┼──────┼───────────┼──────────┼──────────┤
│ 0  │ npm                │ fork    │ 0    │ online    │ 0%      │ 60.6mb  │
└────┴────────────────────┴──────────┴──────┴───────────┴──────────┴──────────┘
 
'''PM2''' is a process manager that serves the [https://en.wikipedia.org/wiki/Npm npm] NexJS App [https://wreckroom.nyc https://wreckroom.nyc]


Upon restarting the Synology, you will to restart PM2 in <code>/volume1/wreckroom.nyc/wreckroom</code> by following these steps:
Upon restarting the Synology, you will to restart PM2 in <code>cd /volume2/wreckroom.nyc/wreckroom.nyc</code> by following these steps:


#End all processes: <code>sudo pm2 delete all</code>.
#End all processes: <code>sudo pm2 delete all</code>.
#Start the [https://en.wikipedia.org/wiki/Npm npm] process using '''PM2''': <code>sudo pm2 start npm -- start</code>.
#Start the [https://en.wikipedia.org/wiki/Npm npm] process using '''PM2''': <code>sudo pm2 start npm -- start</code>.


If you are having issues with '''PM2''' process manager serving the NextJs app (when <code>sudo npm run start</code> works fine), use the above steps as well.
If you are having issues with '''PM2''' process manager serving the NextJS app (when <code>sudo npm run start</code> works fine), use the above steps as well.
 
If having trouble running npm run start due to fonts or other issues try
<code>sudo pm2 start "npm run dev" -- start</code>


===Certificates===
==Certificates==
If you make changes to a Certificate's FQDN, in addition to migrating the certificate, you ''must'' go to Control Panel / Login Portal / Advanced / Reverse Proxy. The hostname must be changed there for everything to work properly! This took half a day to figure out last time, hope it saves you some time in the future :)
If you make changes to a Certificate's FQDN, in addition to migrating the certificate, you ''must'' go to Control Panel / Login Portal / Advanced / Reverse Proxy. The hostname must be changed there for everything to work properly! This took half a day to figure out last time, hope it saves you some time in the future :)

Latest revision as of 13:11, 6 May 2024

The Synology hosts https://wreckroom.nyc over 443 using a NGINX Reverse Proxy via localhost:3000.

Updating Copy to Website[edit]

  1. Commit changes on GitHub
    1. app/page.js (replace text in the <Card /> components
    2. app/components/layout/Mission.js
  2. in terminal, execute
    1. ssh userName@wreckroom.nyc
    2. cd /volume2/wreckroom.nyc/wreckroom.nyc
    3. git pull
    4. sudo pm2 delete all
    5. sudo pm2 start "npm run dev" -- start

PM2[edit]

PM2 is a process manager that serves the npm NextJS App https://wreckroom.nyc

Upon restarting the Synology, you will to restart PM2 in cd /volume2/wreckroom.nyc/wreckroom.nyc by following these steps:

  1. End all processes: sudo pm2 delete all.
  2. Start the npm process using PM2: sudo pm2 start npm -- start.

If you are having issues with PM2 process manager serving the NextJS app (when sudo npm run start works fine), use the above steps as well.

If having trouble running npm run start due to fonts or other issues try sudo pm2 start "npm run dev" -- start

Certificates[edit]

If you make changes to a Certificate's FQDN, in addition to migrating the certificate, you must go to Control Panel / Login Portal / Advanced / Reverse Proxy. The hostname must be changed there for everything to work properly! This took half a day to figure out last time, hope it saves you some time in the future :)