# Contact Form Deployment The website form posts to `/api/contact`. The handler is a small FastAPI app in `api/contact_app.py` and sends mail through Postmark SMTP. ## VM Packages Install Python and the contact API dependencies inside the container or Python runtime that will serve the API: ```bash python3 -m pip install -r requirements-contact-api.txt ``` The runtime needs these environment variables. Do not commit their values: ```bash SMTP_HOST=smtp.postmarkapp.com SMTP_PORT=587 SMTP_USER= SMTP_PASSWORD= CONTACT_TO_EMAIL= CONTACT_FROM_EMAIL= RECAPTCHA_SECRET_KEY= ``` ## Run Command Run the API on an internal port, then route `/api/contact` to it from the existing container/Caddy setup: ```bash uvicorn api.contact_app:app --host 0.0.0.0 --port 8091 ``` Health check: ```bash curl http://localhost:8091/api/contact/healthz ``` The public static site can continue to be served as it is now. The only deployment requirement is that requests for `/api/contact` and `/api/contact/healthz` reach the FastAPI process.