change in to merge
CI/CD - ERP Core / detect (pull_request) Failing after 13m11s
CI/CD - ERP Core / ci-ok (pull_request) Has been cancelled
CI/CD - ERP Core / Build & Deploy (pull_request) Failing after 12m17s
CI/CD - ERP Core / backend (pull_request) Has been cancelled
CI/CD - ERP Core / frontend (pull_request) Has been cancelled
CI/CD - ERP Core / e2e-typecheck (pull_request) Has been cancelled
CI/CD - ERP Core / scripts (pull_request) Has been cancelled

This commit is contained in:
2026-09-16 23:48:07 +05:30
parent c7cf63e7de
commit 2a7a44cc27
6 changed files with 146 additions and 48 deletions
+19 -13
View File
@@ -1,32 +1,38 @@
# ERP-Core API — production (erp.hexdive.com).
#
# Install once (docs/40-DEPLOYMENT.md, "Active" A.2):
# cp deploy/systemd/erpcore.service /etc/systemd/system/
# systemctl daemon-reload && systemctl enable erpcore.service
# .gitea/workflows/ci-cd.yml stops it, replaces /home/erp/core/publish, then starts it again.
# This unit holds only what never changes. Everything configurable — listening URL, connection
# string, AuthHex/GL URLs, storage paths — is written by .gitea/workflows/ci-cd.yml into
# /etc/systemd/system/erpcore.service.d/10-erpcore-env.conf
# on every backend deploy, from the values in that workflow's `env:` block plus Gitea secrets.
# There is no /etc/erpcore/erpcore.env any more. To change a setting, edit the workflow and
# redeploy (docs/40-DEPLOYMENT.md, "Active" A.2/A.3).
#
# The workflow installs this file itself, so editing it here and deploying is enough.
[Unit]
Description=ERP-Core API (production)
Description=ERP core service
After=network-online.target postgresql-16.service
Wants=network-online.target
# Stop hammering the database if a release crash-loops.
# Stop hammering the database if a release crash-loops: give up after 5 starts in 5 minutes
# (systemd then reports "failed", which is what wait-healthy.sh watches for).
StartLimitIntervalSec=300
StartLimitBurst=5
[Service]
Type=simple
User=erp
Group=erp
User=erpuser
Group=erpuser
WorkingDirectory=/home/erp/core/publish
ExecStart=/home/erp/core/publish/ERPCore
# Secrets + settings (template: deploy/env/erpcore.env.example).
EnvironmentFile=/etc/erpcore/erpcore.env
SyslogIdentifier=erpcore
Environment=ASPNETCORE_ENVIRONMENT=Production
Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false
Environment=DOTNET_CLI_TELEMETRY_OPTOUT=1
Restart=on-failure
RestartSec=5
Restart=always
RestartSec=10
TimeoutStopSec=30
# Shared 8 GB VPS: a runaway process must not take Gitea/Postgres down with it.
# Shared 8 GB VPS: a runaway process must not take Gitea/Postgres/AuthHex down with it.
MemoryMax=768M
# Hardening. No ProtectHome: the app itself lives under /home/erp.