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",
|
||||
"script": "ct/guardian.sh",
|
||||
"resources": {
|
||||
"cpu": 4,
|
||||
"cpu": 2,
|
||||
"ram": 2048,
|
||||
"hdd": 6,
|
||||
"os": "Debian",
|
||||
|
@ -44,7 +44,7 @@ msg_ok "Built backend"
|
||||
msg_info "Building frontend"
|
||||
cd /opt/Guardian/frontend
|
||||
npm ci
|
||||
NODE_ENV=development npm run build
|
||||
npm run build
|
||||
msg_ok "Built frontend"
|
||||
|
||||
msg_info "Creating Backend Service"
|
||||
@ -55,7 +55,7 @@ After=network.target
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=/opt/Guardian/backend
|
||||
Environment=NODE_ENV=development
|
||||
Environment=NODE_ENV=production
|
||||
ExecStart=/usr/bin/node dist/main.js
|
||||
Restart=always
|
||||
RestartSec=3
|
||||
@ -76,6 +76,7 @@ Wants=guardian-backend.service
|
||||
[Service]
|
||||
WorkingDirectory=/opt/Guardian/frontend
|
||||
Environment=NODE_ENV=production
|
||||
Environment=DEPLOYMENT_MODE=standalone
|
||||
Environment=PORT=3000
|
||||
ExecStart=/usr/bin/npm run start
|
||||
Restart=always
|
||||
|
Loading…
x
Reference in New Issue
Block a user