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>
Configured application for deployment with Apache reverse proxy and systemd service. The app runs without Docker, using Python venv and Gunicorn.
Key changes:
- deploy.sh: Idempotent deployment script with backup, health checks
- systemd/hm-ems.service: Systemd unit for auto-start/restart
- DEPLOY.md: Complete deployment and troubleshooting guide
- .env.example: Configuration template
- Updated API paths: /api/* → /hm-ems/api/* for Apache routing
- Updated image URLs: /images/* → /hm-ems/images/* for Apache alias
- Updated CLAUDE.md: Added production deployment section
Architecture:
- Flask/Gunicorn on localhost:5000 (systemd service)
- Apache reverse proxy for /hm-ems/api/*
- Apache serves static files from /var/www/html/hm-ems-report/
- Apache serves images from /opt/hm-ems-data/campaign_images/
- Data persistence in /opt/hm-ems-data/ (JSON + images)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>