Changed deployment user from www-data to vadym.samoilenko across all configuration files. Added permission checks and automatic chmod/chown in deploy script. Changes: - deploy.sh: Check user exists, set ownership to vadym.samoilenko, add chmod - systemd service: Run as vadym.samoilenko - DEPLOY.md: Updated all references to vadym.samoilenko - .env.example: Updated default user Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
28 lines
683 B
Desktop File
28 lines
683 B
Desktop File
[Unit]
|
|
Description=H&M EMS Product Review Tool
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=exec
|
|
User=vadym.samoilenko
|
|
Group=vadym.samoilenko
|
|
WorkingDirectory=/opt/hm_ems_report
|
|
Environment="PATH=/opt/hm_ems_report/venv/bin"
|
|
Environment="MASTER_JSON_DIR=/opt/hm-ems-data/Master_Json"
|
|
Environment="IMAGE_BASE_PATH=/opt/hm-ems-data/campaign_images"
|
|
Environment="PORT=5000"
|
|
|
|
ExecStart=/opt/hm_ems_report/venv/bin/gunicorn \
|
|
--bind 127.0.0.1:5000 \
|
|
--workers 4 \
|
|
--timeout 120 \
|
|
--access-logfile /var/log/hm-ems/access.log \
|
|
--error-logfile /var/log/hm-ems/error.log \
|
|
--log-level info \
|
|
server:app
|
|
|
|
Restart=always
|
|
RestartSec=10
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|