- Notifications
You must be signed in to change notification settings - Fork1
Official component for Flask
NotificationsYou must be signed in to change notification settings
diploi/component-flask
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
- In the Dashboard, clickCreate Project +
- UnderPick Components, chooseFlask. Here you can also add a frontend framework to create a monorepo app, eg, Flask for backend and React+Vite for frontend
- InPick Add-ons, you can add one or multiple databases to your app
- ChooseCreate Repository to generate a new GitHub repo
- Finally, clickLaunch Stack
Full guide athttps://diploi.com/blog/hosting_flask_apps
During development, the container installs Node.js andnodemon to enable automatic reloads when files change. The development server is started with:
nodemon --delay 1 --watch"pyproject.toml" --watch".venv/lib/*" --watch".venv/lib64/*" --watch"src" --ext"py" --exec"uv run --isolated flask --app src/main.py run --host=0.0.0.0 --port=8000 --no-reload --debug"
This will:
- Activate the virtual environment in
.venv - This runs the Flask app defined in main.py using the uv tool in an isolated environment, making the app available on all network interfaces at port 8000, with debug mode enabled.
Builds a production-ready image. During the build, dependencies are installed withuv sync. When the container starts, it runs:
uv run --frozen gunicorn -w 4 -b 0.0.0.0:8000 src.main:app
This uses the Gunicorn to serve your application on port 8000.
About
Official component for Flask
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.