Update systemd service to use go run with single log file

- Use 'go run .' instead of compiled binary
- Single unified log file at /var/log/cv.log
- Simpler configuration matching project philosophy
This commit is contained in:
root
2025-10-30 13:05:36 +00:00
parent 5e38292d2e
commit 5d2f763d2e
+4 -18
View File
@@ -8,27 +8,13 @@ Type=simple
User=txeo
Group=txeo
WorkingDirectory=/home/txeo/Git/yo/cv
ExecStart=/home/txeo/Git/yo/cv/cv-server
ExecStart=/usr/bin/go run .
# Environment variables
Environment="GO_ENV=production"
Environment="PORT=1999"
Environment="HOST=0.0.0.0"
Environment="BASE_URL=https://juan.andres.morenorub.io"
Environment="TEMPLATE_HOT_RELOAD=false"
EnvironmentFile=-/home/txeo/Git/yo/cv/.env
# Security hardening
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=false
ReadWritePaths=/home/txeo/Git/yo/cv/data
ReadOnlyPaths=/home/txeo/Git/yo/cv
# Resource limits
LimitNOFILE=65536
MemoryMax=512M
Environment="VERSION=1.0.0"
# Restart policy
Restart=always
@@ -37,8 +23,8 @@ StartLimitInterval=60
StartLimitBurst=3
# Logging
StandardOutput=journal
StandardError=journal
StandardOutput=append:/var/log/cv.log
StandardError=append:/var/log/cv.log
SyslogIdentifier=cv
[Install]