Flask application using Pipenv
Branch: master
Clone or download
Latest commit ef1e7b5 Jul 5, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
helloworld feat: initial commit Jul 6, 2018
tests feat: initial commit Jul 6, 2018
.gitignore feat: initial commit Jul 6, 2018
Dockerfile feat: initial commit Jul 6, 2018
Pipfile feat: initial commit Jul 6, 2018
Pipfile.lock feat: initial commit Jul 6, 2018
README.md feat: initial commit Jul 6, 2018
wsgi.py feat: initial commit Jul 6, 2018

README.md

Flask Pipenv Example

Flask application using Pipenv and Docker.

Running locally

Set up Python environment:

$ pipenv install

To create a virtual environment you just execute the $ pipenv shell.

Run a development server:

$ FLASK_APP=helloworld flask run

Docker image

Build the docker image:

$ docker build -t flask-pipenv-helloworld .

Run the Docker Container:

$ docker run -p 8000:8000 flask-pipenv-helloworld

You can find the container runtime details as shown below:

$ docker ps
CONTAINER ID        IMAGE                             COMMAND                  CREATED             STATUS              PORTS                      NAMES
80af0bce64c7        flask-pipenv-helloworld           "gunicorn -b0.0.0.0:…"   1 second ago        Up Less than a second   0.0.0.0:8000->8000/tcp     silly_goldstine

Running the tests

Install the prerequisites:

$ pipenv install --dev

Runs tests:

$ pipenv run python -m pytest