Deploy Flask in minutes
Flask doesn't have a dedicated preset yet, but deploying it is still a two-minute job: add the Dockerfile below to your repo and pick the Dockerfile preset. Darmi Cloud builds the image and runs gunicorn behind automatic HTTPS.
How to deploy Flask
Darmi Cloud doesn't have a dedicated Flask preset yet — but the Dockerfile preset gets you deployed just as fast.
- 1
Add a Dockerfile to your repo
Commit the Dockerfile below to the root of your Flask repository. Darmi Cloud will build the image from it.
- 2
Sign in with GitHub
Open darmicloud.tech and sign in with GitHub (or Google). On first sign-in you grant read access so the deploy worker can clone your repositories.
- 3
Import your repository
Click New Project, pick your Flask repository, and choose the branch to deploy — the default branch is preselected.
- 4
Select the Dockerfile preset
Choose the Dockerfile preset so Darmi Cloud builds and runs the image from your committed Dockerfile. Set the container port to 8000.
- 5
Add environment variables
Add any environment variables your app needs (database URLs, API keys, secrets). Mark sensitive values as secrets — they are injected into the container and hidden in the UI afterwards.
- 6
Deploy and watch it go live
Click Deploy. Watch the live build and runtime logs, and your app goes live on an automatic HTTPS subdomain. Every push to your branch redeploys automatically.
Dockerfile for Flask
Copy this into a file named Dockerfile at the root of your repository.
# syntax=docker/dockerfile:1
FROM python:3.12-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt gunicorn
COPY . .
ENV PORT=8000
EXPOSE 8000
# Replace "app:app" with "<module>:<Flask instance>"
CMD ["sh", "-c", "gunicorn app:app --bind 0.0.0.0:$PORT"]Tips for Flask on Darmi Cloud
- Change app:app to match your module and Flask app variable (for example wsgi:application).
- Add gunicorn to requirements.txt or keep it in the Dockerfile install line as shown.
- Set the container port in project settings to 8000 to match EXPOSE and the gunicorn bind.
Flask deployment FAQ
Does Darmi Cloud have a native Flask preset?
Not yet — but you deploy Flask by committing a small Dockerfile and choosing the Dockerfile preset. The guide above includes a production-ready Dockerfile using gunicorn.
Should I run Flask with the built-in server in production?
No. Use a WSGI server like gunicorn (as in the Dockerfile above); Flask's built-in development server is not meant for production traffic.
Can I use my own custom domain?
Yes. Connect an existing domain or buy one inside Darmi Cloud. DNS is configured automatically and every domain gets free SSL via Let's Encrypt.
Is there a free plan?
Yes. The Free plan deploys one project on an automatic HTTPS subdomain with auto-deploy on every push. Paid plans add custom domains, PR preview deployments and more projects.
Deploy other frameworks
Ready to deploy your Flask app?
Connect GitHub and ship in minutes — on a free HTTPS subdomain, or on your own custom domain.
Deploy Flask now