Table of Contents
This project is an attempt to build three websites with three different frameworks, this implementation is such that the user or tester cannot distinguish which framework is related to which website.
- Django
- Flask
- FastAPI
This project is based on Docker concept and you can run this project in two ways
you should install docker on your system, you can do that by this link:
https://docs.docker.com/engine/install/
For both methods, you must first download the project on your system
.. Clone the repo
git clone https://github.com/twilight74/WebServices.git
Build containers one by one from docker files and see the result
- Enter the djangoSimpleWebService and create the Django image with the following command
docker build --tag django .
- Then you go back to the main folder of the program and enter flaskSimpleWebService and create the Flask website with the following command
docker build --tag flask .
3.Then you go back to the main folder and enter fastApiSimpleWebService and create the Fast API website with the following command.
docker build --tag fastapi .
4.Now you have built all three websites and you can use testRe to test the project.
Enter testRe and create the test file with the following command
docker build --tag test .
docker network create mynetwork
Now you can see the result by running the images
docker run --name django --network=mynetwork django
docker run --name flask --network=mynetwork flask
docker run --name fastapi --network=mynetwork fastapi
docker run --name test --network=mynetwork test
This method is very simple and includes all the previous instructions
Just enter the main folder and run the whole project with the following command
```
docker compose up
```
In this method, Docker Compose is used, with the help of a yaml file, we run all the Docker commands together, so to speak, we Dockerize the entire project together.
- django
- flask
- fastapi