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:
@@ -8,27 +8,13 @@ Type=simple
|
|||||||
User=txeo
|
User=txeo
|
||||||
Group=txeo
|
Group=txeo
|
||||||
WorkingDirectory=/home/txeo/Git/yo/cv
|
WorkingDirectory=/home/txeo/Git/yo/cv
|
||||||
ExecStart=/home/txeo/Git/yo/cv/cv-server
|
ExecStart=/usr/bin/go run .
|
||||||
|
|
||||||
# Environment variables
|
# Environment variables
|
||||||
Environment="GO_ENV=production"
|
Environment="GO_ENV=production"
|
||||||
Environment="PORT=1999"
|
Environment="PORT=1999"
|
||||||
Environment="HOST=0.0.0.0"
|
|
||||||
Environment="BASE_URL=https://juan.andres.morenorub.io"
|
Environment="BASE_URL=https://juan.andres.morenorub.io"
|
||||||
Environment="TEMPLATE_HOT_RELOAD=false"
|
Environment="VERSION=1.0.0"
|
||||||
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
|
|
||||||
|
|
||||||
# Restart policy
|
# Restart policy
|
||||||
Restart=always
|
Restart=always
|
||||||
@@ -37,8 +23,8 @@ StartLimitInterval=60
|
|||||||
StartLimitBurst=3
|
StartLimitBurst=3
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
StandardOutput=journal
|
StandardOutput=append:/var/log/cv.log
|
||||||
StandardError=journal
|
StandardError=append:/var/log/cv.log
|
||||||
SyslogIdentifier=cv
|
SyslogIdentifier=cv
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|||||||
Reference in New Issue
Block a user