Coder Social home page Coder Social logo

k8s-web's Introduction

Simple Web Application -- k8s-webserver

Version Released

Author License OS Debian

A simple two-tier web app, using Flask and MongoDB to experiment and learn Kubernetes capabilities.

GitOps Model

This is only the "development" part of the services, which contains solely the code for the application, and whose generated artifact(s) are the Docker containers.

The associated "deployment" project contains all the necessary automation to deploy the service on a Kubernetes cluster.

Container Build

Build the container (the value of $VERSION will be derived from build.settings):

$ ./build.py

[SUCCESS] Image massenz/simple-flask:$VERSION built

then run it (get the current version from build.settings):

$ docker run --rm -d mongo:3.7
$ docker run --rm -d -p 8088:8080 massenz/simple-flask:$VERSION

the server is then reachable at [http://localhost:8080].

You can change some of the server arguments using the following --env args:

$ docker run --rm -d -p 8088:8080 massenz/simple-flask:$VERSION \
     --env DEBUG='--debug' --env SERVER_PORT=9900 --env SECRET='chang3Me'

Before deploying the application to Kubernetes, push the built containers to Docker Hub:

$ ./build.py --push

Service API

TODO: Describe the API here

The main service page (index.html) will show a brief summary of the available endpoints: reach the service from a browser at http://localhost:8080.

k8s-web's People

Contributors

massenz avatar mmassenzio avatar

Watchers

 avatar

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.