sharkymark / envb-flask-hw

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Flask as a dev container

Flask is WSGI web app framework written in Python. This app calculates sales commissions based on user input in a standard web browser.

dev container

I'm using a dev container so I don't have to install Python and Flask on my Mac. All I need a is a Docker daemon, which in my case is colima and VS Code with the dev container extension.

Coder env builder

This dev container has been modified to work in Coder's envbuilder framework. To-Do: It appears starting flask, either as CMD at the end of the Dockerfile, or as postCreateCommand in the devcontainer.json is not working.

Therefore, manually start the flask app with this command run within the repo directory.

flask run --host=0.0.0.0

Accessing the Flask app

If running locally or in envbuilder, open a web browser and enter localhost:5001 to see the Flask app

Resources

Coder's envbuilder OSS repo

Flask

Dev Container specification

Install Coder's Cloud Development Environment OSS

About


Languages

Language:Python 37.6%Language:HTML 33.5%Language:CSS 17.4%Language:Dockerfile 11.4%