Reduce CPU allocation to 2 for Guardian installation and update environment variables for production deployment
This commit is contained in:
parent
d30d512091
commit
f6a8eed717
@ -17,7 +17,7 @@
|
|||||||
"type": "default",
|
"type": "default",
|
||||||
"script": "ct/guardian.sh",
|
"script": "ct/guardian.sh",
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": 4,
|
"cpu": 2,
|
||||||
"ram": 2048,
|
"ram": 2048,
|
||||||
"hdd": 6,
|
"hdd": 6,
|
||||||
"os": "Debian",
|
"os": "Debian",
|
||||||
|
@ -44,7 +44,7 @@ msg_ok "Built backend"
|
|||||||
msg_info "Building frontend"
|
msg_info "Building frontend"
|
||||||
cd /opt/Guardian/frontend
|
cd /opt/Guardian/frontend
|
||||||
npm ci
|
npm ci
|
||||||
NODE_ENV=development npm run build
|
npm run build
|
||||||
msg_ok "Built frontend"
|
msg_ok "Built frontend"
|
||||||
|
|
||||||
msg_info "Creating Backend Service"
|
msg_info "Creating Backend Service"
|
||||||
@ -55,7 +55,7 @@ After=network.target
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
WorkingDirectory=/opt/Guardian/backend
|
WorkingDirectory=/opt/Guardian/backend
|
||||||
Environment=NODE_ENV=development
|
Environment=NODE_ENV=production
|
||||||
ExecStart=/usr/bin/node dist/main.js
|
ExecStart=/usr/bin/node dist/main.js
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=3
|
RestartSec=3
|
||||||
@ -76,6 +76,7 @@ Wants=guardian-backend.service
|
|||||||
[Service]
|
[Service]
|
||||||
WorkingDirectory=/opt/Guardian/frontend
|
WorkingDirectory=/opt/Guardian/frontend
|
||||||
Environment=NODE_ENV=production
|
Environment=NODE_ENV=production
|
||||||
|
Environment=DEPLOYMENT_MODE=standalone
|
||||||
Environment=PORT=3000
|
Environment=PORT=3000
|
||||||
ExecStart=/usr/bin/npm run start
|
ExecStart=/usr/bin/npm run start
|
||||||
Restart=always
|
Restart=always
|
||||||
|
Loading…
x
Reference in New Issue
Block a user