initialising for ci-cd pipeline
CI/CD - ERP Core / scripts (pull_request) Failing after 12m21s
CI/CD - ERP Core / e2e-typecheck (pull_request) Failing after 13m13s
CI/CD - ERP Core / frontend (pull_request) Failing after 14m5s
CI/CD - ERP Core / backend (pull_request) Failing after 14m57s
CI/CD - ERP Core / detect (pull_request) Failing after 13m42s
CI/CD - ERP Core / Build & Deploy (pull_request) Failing after 12m47s
CI/CD - ERP Core / ci-ok (pull_request) Failing after 14m58s

This commit is contained in:
2026-09-16 11:53:55 +05:30
parent 666979cf22
commit 8e472ac996
48 changed files with 2224 additions and 62 deletions
+40
View File
@@ -0,0 +1,40 @@
# ERP-Core API — one template for both environments: erpcore@test and erpcore@release.
#
# Install once (docs/40-DEPLOYMENT.md §4):
# cp deploy/systemd/erpcore@.service /etc/systemd/system/
# systemctl daemon-reload && systemctl enable erpcore@test erpcore@release
# The pipeline never edits this file: a deploy only repoints /opt/erpcore/<env>/backend/current
# and restarts the unit (deploy/scripts/deploy-backend.sh).
[Unit]
Description=ERP-Core API (%i)
After=network-online.target postgresql-16.service
Wants=network-online.target
# Stop hammering the database if a release crash-loops; the deploy script rolls back anyway.
StartLimitIntervalSec=300
StartLimitBurst=5
[Service]
Type=simple
User=erpcore
Group=erpcore
WorkingDirectory=/opt/erpcore/%i/backend/current
ExecStart=/opt/erpcore/%i/backend/current/ERPCore
# Secrets + per-environment settings (template: deploy/env/erpcore.env.example).
EnvironmentFile=/etc/erpcore/%i.env
Environment=DOTNET_CLI_TELEMETRY_OPTOUT=1
Restart=on-failure
RestartSec=5
TimeoutStopSec=30
# Shared 8 GB VPS: a runaway instance must not take Gitea/Postgres down with it.
MemoryMax=768M
# Hardening. The app writes only to /var/lib/erpcore/%i and /var/log/erpcore/%i (owned by erpcore).
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=full
ProtectHome=true
[Install]
WantedBy=multi-user.target