This problem statement has two objectives:
- Get familiar with reading error stack trace and debugging code.
- Convert a monolith architecture based docker-compose application into a microservices based architecture.
- docker and docker-compose. Follow the guides based on your operating system.
- Internet. Pull docker image
python:3.8-alpinebeforehand to avoid connectivity issues.
Web Application Before Submit
Web Application After Submit
Starting Services
# under the microservices directory
# NOTE: For any code changes to be reflected, the build command must be rerun, and then up
docker-compose build
# run without the -d flag incase you want to observe the logs
docker-compose up -d
docker-compose down
The diagram only shows the services already defined within the microservice architecture for visualization purposes. You still need to add services of your own.
- Directory structure of additional arithmetic microservices you will be adding:
├── <name of the service>
│ ├── Dockerfile # same as landing/Dockerfile
│ ├── app
│ │ ├── app.py # TODO: by yourself
│ │ └── requirements.txt # same as landing/app/requirements.txt
│ │
Since the docker services are running on the local machine, we will have to disable CORS which is enabled by default in every browser. To disable CORS in the Opera browser, run this command:







