Simple Flask Service

This is a simple Flask web service created to demonstrate how to create a web service and deploy it using Docker.

Manual Installation & Running

Dependencies:

  • python 3.9
  1. Install requirements
    pip install -r requirements.txt
  2. Configure environment variables.
    Copy .env.manual file to .env
    cp .env.manual .env
  3. Launch service
    python app.py
  4. Access the service at http://localhost:8888

Installation & Running with Docker

  1. Configure environment variables.
    Copy .env.docker file to .env
    cp .env.docker .env
  2. Build docker image
        docker build -t simple-flask-service .
  3. Run docker service
        docker run -p 8888:8888 simple-flask-service
  4. Access the service at http://localhost:8888

Installation & Running with Docker Compose

  1. Configure environment variables.
    Copy .env.docker file to .env
    cp .env.docker .env
  2. Build and Run with Docker Compose
    docker-compose up --build
  3. Access the service at http://localhost:8888