All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 45s
Extract queue name constants to queue.constants.ts to resolve the require cycle that caused 'Cannot read properties of undefined' at startup. Both queue-definitions.ts and queue.service.ts now import from the shared constants file. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
35 lines
704 B
Desktop File
35 lines
704 B
Desktop File
[Unit]
|
|
Description=zhixi NestJS API Server
|
|
After=network.target mysql.service redis.service
|
|
Wants=mysql.service redis.service
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=www-data
|
|
Group=www-data
|
|
WorkingDirectory=/opt/zhixi/api-server
|
|
ExecStart=/usr/bin/node dist/src/main.js
|
|
Restart=always
|
|
RestartSec=5
|
|
TimeoutStopSec=30
|
|
|
|
# Environment
|
|
Environment=NODE_ENV=production
|
|
Environment=PORT=3000
|
|
EnvironmentFile=/opt/zhixi/env/.env.production
|
|
|
|
# Security
|
|
NoNewPrivileges=yes
|
|
ProtectSystem=strict
|
|
ProtectHome=yes
|
|
ReadWritePaths=/opt/zhixi/api-server/uploads
|
|
ReadWritePaths=/opt/zhixi/api-server/prisma
|
|
|
|
# Logging
|
|
StandardOutput=journal
|
|
StandardError=journal
|
|
SyslogIdentifier=zhixi-nest-api
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|