-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update production environment documentation #794
base: master
Are you sure you want to change the base?
Conversation
@matkoniecz @tomalrussell I've continued from where we left off on Tuesday today, however I'm still unable to get the application to be visible at the IP address with either As for the backups, maintenance & domain steps at the end of the doc I've just added placeholders for now. I notice that in ecosystem.config.dev-template.js we have extra env vars compared to what the doc says to include, e.g. |
would try |
Ok yes thanks this has found a problem, I think this must be the important line |
Have you built the app successfully ( |
@tomalrussell yep it's there, and Full readout of azureuser@cl-test-server:/var/www/colouring-london$ pm2 logs
[TAILING] Tailing last 15 lines for [all] processes (change the value with --lines option)
/home/azureuser/.pm2/pm2.log last 15 lines:
PM2 | 2022-03-03T15:51:05: PM2 log: App [colouringlondon:5] exited with code [0] via signal [SIGINT]
PM2 | 2022-03-03T15:51:05: PM2 log: pid=28591 msg=process killed
PM2 | 2022-03-03T15:51:05: PM2 log: pid=28592 msg=process killed
PM2 | 2022-03-03T15:54:03: PM2 log: App [colouringlondon:0] starting in -cluster mode-
PM2 | 2022-03-03T15:54:03: PM2 log: App [colouringlondon:1] starting in -cluster mode-
PM2 | 2022-03-03T15:54:03: PM2 log: App [colouringlondon:0] online
PM2 | 2022-03-03T15:54:03: PM2 log: App [colouringlondon:2] starting in -cluster mode-
PM2 | 2022-03-03T15:54:03: PM2 log: App [colouringlondon:1] online
PM2 | 2022-03-03T15:54:03: PM2 log: App [colouringlondon:3] starting in -cluster mode-
PM2 | 2022-03-03T15:54:03: PM2 log: App [colouringlondon:2] online
PM2 | 2022-03-03T15:54:03: PM2 log: App [colouringlondon:3] online
PM2 | 2022-03-03T15:54:03: PM2 log: App [colouringlondon:4] starting in -cluster mode-
PM2 | 2022-03-03T15:54:03: PM2 log: App [colouringlondon:5] starting in -cluster mode-
PM2 | 2022-03-03T15:54:04: PM2 log: App [colouringlondon:5] online
PM2 | 2022-03-03T15:54:04: PM2 log: App [colouringlondon:4] online
/home/azureuser/.pm2/logs/colouringlondon-error-0.log last 15 lines:
0|colourin | at WriteStream.<anonymous> (/usr/local/lib/node/node-v16.13.2/lib/node_modules/pm2/lib/Utility.js:186:13)
0|colourin | at WriteStream.emit (node:events:390:28)
0|colourin | at node:internal/fs/streams:72:16
0|colourin | at FSReqCallback.oncomplete (node:fs:188:23)
0|colourin | Error: Cannot find module '/var/www/colouring-london/app/build/server.js'
0|colourin | at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
0|colourin | at Function.Module._load (node:internal/modules/cjs/loader:778:27)
0|colourin | at /usr/local/lib/node/node-v16.13.2/lib/node_modules/pm2/lib/ProcessContainer.js:303:25
0|colourin | at wrapper (/usr/local/lib/node/node-v16.13.2/lib/node_modules/pm2/node_modules/async/internal/once.js:12:16)
0|colourin | at next (/usr/local/lib/node/node-v16.13.2/lib/node_modules/pm2/node_modules/async/waterfall.js:96:20)
0|colourin | at /usr/local/lib/node/node-v16.13.2/lib/node_modules/pm2/node_modules/async/internal/onlyOnce.js:12:16
0|colourin | at WriteStream.<anonymous> (/usr/local/lib/node/node-v16.13.2/lib/node_modules/pm2/lib/Utility.js:186:13)
0|colourin | at WriteStream.emit (node:events:390:28)
0|colourin | at node:internal/fs/streams:72:16
0|colourin | at FSReqCallback.oncomplete (node:fs:188:23)
/home/azureuser/.pm2/logs/colouringlondon-error-1.log last 15 lines:
1|colourin | at WriteStream.<anonymous> (/usr/local/lib/node/node-v16.13.2/lib/node_modules/pm2/lib/Utility.js:186:13)
1|colourin | at WriteStream.emit (node:events:390:28)
1|colourin | at node:internal/fs/streams:72:16
1|colourin | at FSReqCallback.oncomplete (node:fs:188:23)
1|colourin | Error: Cannot find module '/var/www/colouring-london/app/build/server.js'
1|colourin | at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
1|colourin | at Function.Module._load (node:internal/modules/cjs/loader:778:27)
1|colourin | at /usr/local/lib/node/node-v16.13.2/lib/node_modules/pm2/lib/ProcessContainer.js:303:25
1|colourin | at wrapper (/usr/local/lib/node/node-v16.13.2/lib/node_modules/pm2/node_modules/async/internal/once.js:12:16)
1|colourin | at next (/usr/local/lib/node/node-v16.13.2/lib/node_modules/pm2/node_modules/async/waterfall.js:96:20)
1|colourin | at /usr/local/lib/node/node-v16.13.2/lib/node_modules/pm2/node_modules/async/internal/onlyOnce.js:12:16
1|colourin | at WriteStream.<anonymous> (/usr/local/lib/node/node-v16.13.2/lib/node_modules/pm2/lib/Utility.js:186:13)
1|colourin | at WriteStream.emit (node:events:390:28)
1|colourin | at node:internal/fs/streams:72:16
1|colourin | at FSReqCallback.oncomplete (node:fs:188:23)
/home/azureuser/.pm2/logs/colouringlondon-error-5.log last 15 lines:
5|colourin | at WriteStream.<anonymous> (/usr/local/lib/node/node-v16.13.2/lib/node_modules/pm2/lib/Utility.js:186:13)
5|colourin | at WriteStream.emit (node:events:390:28)
5|colourin | at node:internal/fs/streams:72:16
5|colourin | at FSReqCallback.oncomplete (node:fs:188:23)
5|colourin | Error: Cannot find module '/var/www/colouring-london/app/build/server.js'
5|colourin | at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
5|colourin | at Function.Module._load (node:internal/modules/cjs/loader:778:27)
5|colourin | at /usr/local/lib/node/node-v16.13.2/lib/node_modules/pm2/lib/ProcessContainer.js:303:25
5|colourin | at wrapper (/usr/local/lib/node/node-v16.13.2/lib/node_modules/pm2/node_modules/async/internal/once.js:12:16)
5|colourin | at next (/usr/local/lib/node/node-v16.13.2/lib/node_modules/pm2/node_modules/async/waterfall.js:96:20)
5|colourin | at /usr/local/lib/node/node-v16.13.2/lib/node_modules/pm2/node_modules/async/internal/onlyOnce.js:12:16
5|colourin | at WriteStream.<anonymous> (/usr/local/lib/node/node-v16.13.2/lib/node_modules/pm2/lib/Utility.js:186:13)
5|colourin | at WriteStream.emit (node:events:390:28)
5|colourin | at node:internal/fs/streams:72:16
5|colourin | at FSReqCallback.oncomplete (node:fs:188:23)
/home/azureuser/.pm2/logs/colouringlondon-error-3.log last 15 lines:
3|colourin | at WriteStream.<anonymous> (/usr/local/lib/node/node-v16.13.2/lib/node_modules/pm2/lib/Utility.js:186:13)
3|colourin | at WriteStream.emit (node:events:390:28)
3|colourin | at node:internal/fs/streams:72:16
3|colourin | at FSReqCallback.oncomplete (node:fs:188:23)
3|colourin | Error: Cannot find module '/var/www/colouring-london/app/build/server.js'
3|colourin | at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
3|colourin | at Function.Module._load (node:internal/modules/cjs/loader:778:27)
3|colourin | at /usr/local/lib/node/node-v16.13.2/lib/node_modules/pm2/lib/ProcessContainer.js:303:25
3|colourin | at wrapper (/usr/local/lib/node/node-v16.13.2/lib/node_modules/pm2/node_modules/async/internal/once.js:12:16)
3|colourin | at next (/usr/local/lib/node/node-v16.13.2/lib/node_modules/pm2/node_modules/async/waterfall.js:96:20)
3|colourin | at /usr/local/lib/node/node-v16.13.2/lib/node_modules/pm2/node_modules/async/internal/onlyOnce.js:12:16
3|colourin | at WriteStream.<anonymous> (/usr/local/lib/node/node-v16.13.2/lib/node_modules/pm2/lib/Utility.js:186:13)
3|colourin | at WriteStream.emit (node:events:390:28)
3|colourin | at node:internal/fs/streams:72:16
3|colourin | at FSReqCallback.oncomplete (node:fs:188:23)
/home/azureuser/.pm2/logs/colouringlondon-error-2.log last 15 lines:
2|colourin | at WriteStream.<anonymous> (/usr/local/lib/node/node-v16.13.2/lib/node_modules/pm2/lib/Utility.js:186:13)
2|colourin | at WriteStream.emit (node:events:390:28)
2|colourin | at node:internal/fs/streams:72:16
2|colourin | at FSReqCallback.oncomplete (node:fs:188:23)
2|colourin | Error: Cannot find module '/var/www/colouring-london/app/build/server.js'
2|colourin | at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
2|colourin | at Function.Module._load (node:internal/modules/cjs/loader:778:27)
2|colourin | at /usr/local/lib/node/node-v16.13.2/lib/node_modules/pm2/lib/ProcessContainer.js:303:25
2|colourin | at wrapper (/usr/local/lib/node/node-v16.13.2/lib/node_modules/pm2/node_modules/async/internal/once.js:12:16)
2|colourin | at next (/usr/local/lib/node/node-v16.13.2/lib/node_modules/pm2/node_modules/async/waterfall.js:96:20)
2|colourin | at /usr/local/lib/node/node-v16.13.2/lib/node_modules/pm2/node_modules/async/internal/onlyOnce.js:12:16
2|colourin | at WriteStream.<anonymous> (/usr/local/lib/node/node-v16.13.2/lib/node_modules/pm2/lib/Utility.js:186:13)
2|colourin | at WriteStream.emit (node:events:390:28)
2|colourin | at node:internal/fs/streams:72:16
2|colourin | at FSReqCallback.oncomplete (node:fs:188:23)
/home/azureuser/.pm2/logs/colouringlondon-error-4.log last 15 lines:
4|colourin | at WriteStream.<anonymous> (/usr/local/lib/node/node-v16.13.2/lib/node_modules/pm2/lib/Utility.js:186:13)
4|colourin | at WriteStream.emit (node:events:390:28)
4|colourin | at node:internal/fs/streams:72:16
4|colourin | at FSReqCallback.oncomplete (node:fs:188:23)
4|colourin | Error: Cannot find module '/var/www/colouring-london/app/build/server.js'
4|colourin | at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
4|colourin | at Function.Module._load (node:internal/modules/cjs/loader:778:27)
4|colourin | at /usr/local/lib/node/node-v16.13.2/lib/node_modules/pm2/lib/ProcessContainer.js:303:25
4|colourin | at wrapper (/usr/local/lib/node/node-v16.13.2/lib/node_modules/pm2/node_modules/async/internal/once.js:12:16)
4|colourin | at next (/usr/local/lib/node/node-v16.13.2/lib/node_modules/pm2/node_modules/async/waterfall.js:96:20)
4|colourin | at /usr/local/lib/node/node-v16.13.2/lib/node_modules/pm2/node_modules/async/internal/onlyOnce.js:12:16
4|colourin | at WriteStream.<anonymous> (/usr/local/lib/node/node-v16.13.2/lib/node_modules/pm2/lib/Utility.js:186:13)
4|colourin | at WriteStream.emit (node:events:390:28)
4|colourin | at node:internal/fs/streams:72:16
4|colourin | at FSReqCallback.oncomplete (node:fs:188:23)
/home/azureuser/.pm2/logs/colouringlondon-out-0.log last 15 lines:
0|colourin | 🚀 started
0|colourin | 🚀 started
0|colourin | 🚀 started
0|colourin | 🚀 started
0|colourin | 🚀 started
0|colourin | 🚀 started
0|colourin | 🚀 started
0|colourin | 🚀 started
/home/azureuser/.pm2/logs/colouringlondon-out-1.log last 15 lines:
1|colourin | 🚀 started
1|colourin | 🚀 started
1|colourin | 🚀 started
1|colourin | 🚀 started
1|colourin | 🚀 started
1|colourin | 🚀 started
1|colourin | 🚀 started
1|colourin | 🚀 started
/home/azureuser/.pm2/logs/colouringlondon-out-2.log last 15 lines:
2|colourin | 🚀 started
2|colourin | 🚀 started
2|colourin | 🚀 started
2|colourin | 🚀 started
2|colourin | 🚀 started
2|colourin | 🚀 started
2|colourin | 🚀 started
2|colourin | 🚀 started
/home/azureuser/.pm2/logs/colouringlondon-out-3.log last 15 lines:
3|colourin | 🚀 started
3|colourin | 🚀 started
3|colourin | 🚀 started
3|colourin | 🚀 started
3|colourin | 🚀 started
3|colourin | 🚀 started
3|colourin | 🚀 started
3|colourin | 🚀 started
/home/azureuser/.pm2/logs/colouringlondon-out-4.log last 15 lines:
4|colourin | 🚀 started
4|colourin | 🚀 started
4|colourin | 🚀 started
4|colourin | 🚀 started
4|colourin | 🚀 started
4|colourin | 🚀 started
4|colourin | 🚀 started
4|colourin | 🚀 started
/home/azureuser/.pm2/logs/colouringlondon-out-5.log last 15 lines:
5|colourin | 🚀 started
5|colourin | 🚀 started
5|colourin | 🚀 started
5|colourin | 🚀 started
5|colourin | 🚀 started
5|colourin | 🚀 started
5|colourin | 🚀 started
5|colourin | 🚀 started |
By the way, one thing I have changed since Tuesday is that I symlinked the whole CL repo, so |
I'd be surprised if this is causing problems, but would suggest that we end up not doing that, so we can build outside of the live directory, and minimise downtime on redeployment, moving the updated code into place and restarting. If what you have in place is helpful while testing, keep going. Quick reading suggests the error might be linked to ESM module resolution changes - see https://stackoverflow.com/questions/65384754/error-err-module-not-found-cannot-find-module and Unitech/pm2#4540 Could try:
|
Changes
Updates and fixes the colouring-london doc for setting up the website on a server.
View rendered md
TODO:
[ ] Combine this doc with the dev doc to avoid duplication of sectionsEC edit: I think there are enough differences to justify separate docs