Deploy Flask
Prepare the repository
Commit the application's Python dependency file. Define a production web process that binds to the runtime port.
For a module named app.py containing app = Flask(...), a typical command is:
gunicorn app:app --bind 0.0.0.0:$PORTAdapt the module and application object names to your repository. Ensure Gunicorn or the selected production server is in the dependency file.
Deploy
- Connect GitHub or GitLab.
- Select the repository and branch.
- Let the agent detect the root, Python dependencies, and port.
- Add required environment variables.
- Review the detected process command.
- Deploy and read Build Logs.
If the Flask application needs a database, queue, or worker, provision the supported resource and use the connection values expected by the application.