From 5d2f763d2ef145a768d8f1fddbcc64aeb20b090a Mon Sep 17 00:00:00 2001 From: root Date: Thu, 30 Oct 2025 13:05:36 +0000 Subject: [PATCH] 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 --- config/systemd/cv.service | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/config/systemd/cv.service b/config/systemd/cv.service index 872f9a1..2669bb6 100644 --- a/config/systemd/cv.service +++ b/config/systemd/cv.service @@ -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]