Refactor frontend setup in guardian-install.sh to streamline installation process and update service configuration
This commit is contained in:
parent
c520602fcb
commit
f48609011b
@ -43,12 +43,11 @@ npm ci
|
|||||||
npm run build
|
npm run build
|
||||||
msg_ok "Built backend"
|
msg_ok "Built backend"
|
||||||
|
|
||||||
# ===== Build Frontend =====
|
# ===== Install Frontend Dependencies =====
|
||||||
msg_info "Building frontend"
|
msg_info "Installing frontend dependencies"
|
||||||
cd /opt/Guardian/frontend
|
cd /opt/Guardian/frontend
|
||||||
npm ci
|
npm ci
|
||||||
npm run build
|
msg_ok "Installed frontend dependencies"
|
||||||
msg_ok "Built frontend"
|
|
||||||
|
|
||||||
# ===== Backend Service =====
|
# ===== Backend Service =====
|
||||||
msg_info "Creating Backend Service"
|
msg_info "Creating Backend Service"
|
||||||
@ -81,7 +80,8 @@ Wants=guardian-backend.service
|
|||||||
[Service]
|
[Service]
|
||||||
WorkingDirectory=/opt/Guardian/frontend
|
WorkingDirectory=/opt/Guardian/frontend
|
||||||
Environment=NODE_ENV=development
|
Environment=NODE_ENV=development
|
||||||
ExecStart=/usr/bin/npm run start
|
Environment=PORT=3000
|
||||||
|
ExecStart=/usr/bin/npm run dev
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=3
|
RestartSec=3
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user