Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Python Web Server

lab03


Overview

This is a web application providing detailed information about itself and its runtime environment

Prerequisites

  • Python 3.14.0

Installation

python -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Running the Application

You can create .env file storing all enviroment values. To run application simply type:

python app.py

Docker

You can also build, pull, and run this app using Docker.

To build simply run:

docker build -t devops .

To pull simply run:

docker pull docker.io/kosmogor/devops

To run simply run:

docker run devops:latest

Testing

App can be easily tested after installation by simply running:

pytest /tests

API Endpoints

  • GET / - Service and system information
  • GET /health - Health check
  • GET /visits - Root endpoint visits count

Configuration

Supported enviroment values:

  • HOST - address for running app
  • PORT - port for running app
  • DEBUG - [true/false] enable debug features or not