Coder Social home page Coder Social logo

devops's Introduction

Python application Python Docker Image

DevOps LAB 1 - Python web application

A simple one-page app that shows current time in Moscow.

image

Built With

  • Python
  • Flask
  • Jinja2
  • Gevent
  • pytest
  • pylint/Dockerfile Linter

Live Demo

Live Demo Link

Getting Started

To get a local copy up and running follow these simple example steps.

Prerequisites

Install python and pip

$ sudo apt install python3 python3-pip python3-venv

Setup

$ git clone https://github.com/Leosimetti/devops
$ cd devops

Install

$ cd app_python
$ python3 -m venv venv
$ source venv/bin/activate
$ pip3 install -r requirements.txt

Usage

Set the PORT and HOST_IP environmental variables to the desired values

$ cd app_python
$ pyhton3 main.py

By default, the application will be available at http://localhost:5000

Docker

Run in Docker

$ docker pull leosimonetti/devops-lab1-flask
$ docker run -p 5000:5000 leosimonetti/devops-lab1-flask

Build and run

$ cd app_python
$ docker build --tag clock_app --target build .
$ docker run -p 5000:5000 clock_app

Unit testing

Run tests

$ cd app_python
$ pytest

Run tests in Docker

$ cd app_python
$ docker build --target test .

Author

👤 Vitaliy Korbashov, BS18-SE-01

devops's People

Contributors

leosimetti avatar

Stargazers

Mikhail Olokin avatar

Watchers

 avatar

devops's Issues

КАК

сделать женкинс?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.