This is Python web application written using FastAPI framework and WorldTimeAPI showing current Moscow time.
Before running the application, please install its prerequisites:
To run from the master branch, follow the instructions below:
- Clone web application repository locally.
git clone https://github.com/rufusnufus/devops cd devops/app_python/
- Create virtual environment.
python3 -m virtualenv venv source venv/bin/activate
- Install packages.
pip install -r requirements.txt
- Run the application. Web app will open at http://localhost:8000/.
uvicorn moscow_time.main:app --reload
Before running the application, please install its prerequisites:
To run from the master branch, follow the instructions below:
- Clone web application repository locally.
git clone https://github.com/rufusnufus/devops cd devops/app_python/
- [Optional] Build the image.
docker build -t nufusrufus/devops .
- Run the container. Web app will open at http://localhost:8000/.
docker run -p 8000:8000 -v data:/home/app/data nufusrufus/devops
- Make sure that you are in the application directory:
cd devops/app_python
- Run the tests:
pytest tests
/
- shows moscow current time/metrics
- shows metrics of the app/visits
- times when the root path/
was accessed by the client
If you have any questions or ideas, write me in Telegram: @rufusnufus