🚀 How deployment works

Deployment is handled by LandingDeploymentProcessor:

  1. Fetches Landing and Domain
  2. Renders HTML (Jinja2)
  3. Connects via SFTP
  4. Recreates the route directory
  5. Uploads index.php, media, and JS
  6. Creates a Deployment record and writes logs

📁 Remote file structure

Root directory:

/home/<sftp_username>/public_html

Deployment result:

<public_html>/<route>/
  index.php
  /media/
  /js/
<public_html>/worker.js

✅ Final statuses

  • pendingdeployed
  • pendingfailed

On success:

  • Landing.is_active = True
  • the URL is added to landing_links

⚠️ Important details

  • SFTP connection ignores host key checking
  • The route directory is fully removed before redeploy
  • worker.js is uploaded only if missing
    (to update it — delete it on the server)