This is a simple Flask web service created to demonstrate how to create a web service and deploy it using Docker.
Dependencies:
- python 3.9
- Install requirements
pip install -r requirements.txt
- Configure environment variables.
Copy.env.manual
file to.env
cp .env.manual .env
- Launch service
python app.py
- Access the service at http://localhost:8888
- Configure environment variables.
Copy.env.docker
file to.env
cp .env.docker .env
- Build docker image
docker build -t simple-flask-service .
- Run docker service
docker run -p 8888:8888 simple-flask-service
- Access the service at http://localhost:8888
- Configure environment variables.
Copy.env.docker
file to.env
cp .env.docker .env
- Build and Run with Docker Compose
docker-compose up --build
- Access the service at http://localhost:8888