fix: load .env in production systemd service for chat API keys
- Add EnvironmentFile=/home/txeo/Git/yo/cv/.env to systemd unit - Add production overrides (GO_ENV, BEHIND_PROXY, ALLOWED_ORIGINS) - Deploy workflow now auto-updates systemd service file on each deploy
This commit is contained in:
@@ -10,11 +10,17 @@ Group=txeo
|
||||
WorkingDirectory=/home/txeo/Git/yo/cv
|
||||
ExecStart=/usr/bin/go run .
|
||||
|
||||
# Environment variables
|
||||
# Load environment from .env file (API keys, SMTP, chat config)
|
||||
EnvironmentFile=/home/txeo/Git/yo/cv/.env
|
||||
|
||||
# Production overrides (take precedence over .env)
|
||||
Environment="GO_ENV=production"
|
||||
Environment="PORT=1999"
|
||||
Environment="BASE_URL=https://juan.andres.morenorub.io"
|
||||
Environment="VERSION=1.0.0"
|
||||
Environment="TEMPLATE_HOT_RELOAD=false"
|
||||
Environment="BEHIND_PROXY=true"
|
||||
Environment="TRUSTED_PROXY_IP=127.0.0.1"
|
||||
Environment="ALLOWED_ORIGINS=juan.andres.morenorub.io"
|
||||
|
||||
# Restart policy
|
||||
Restart=always
|
||||
|
||||
Reference in New Issue
Block a user