Skip to content
This repository has been archived by the owner on Jul 17, 2022. It is now read-only.

Latest commit

 

History

History
54 lines (34 loc) · 1.13 KB

README.md

File metadata and controls

54 lines (34 loc) · 1.13 KB

DevOps Engineering labs

Python Docker

This is a simple python web application for displaying current Moscow time on page load. Written in Flask and contained in Docker.

Installation

Mount the virtual environment and install the packages.

python -m venv venv
pip install -r requirements.txt

Usage

There are several ways to run the app:

# direct python launch
python main.py

# or running the flask
flask run

# or building the docker image
docker build -t inno-f21-doe:latest .
docker run -d -p 5000:5000 inno-f21-doe:latest

Endpoints

  • /: Displays the current time in Moscow.
  • /visits: Displays the number of visits to the app.

Testing

Unit tests are present:

python -m pytest

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT