fix: production chat — load API keys from .env via systemd
This commit is contained in:
@@ -70,6 +70,11 @@ jobs:
|
||||
# git stash pop || echo "⚠️ Could not reapply stash (conflicts?)"
|
||||
# fi
|
||||
|
||||
# Update systemd service file if changed
|
||||
echo "📋 Updating systemd service..."
|
||||
sudo cp config/systemd/cv.service /etc/systemd/system/$SERVICE_NAME.service
|
||||
sudo systemctl daemon-reload
|
||||
|
||||
echo "🔄 Restarting service..."
|
||||
sudo systemctl restart $SERVICE_NAME
|
||||
|
||||
|
||||
@@ -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