3.5 KiB
Product manager
Overview of the APP
This is a product management application for admin. Here you can upload, edit, delete products. Probably a front-end will show these products to the user if future.
Edit functionality is not implemented at this moment
Requirements
The basic system requirements are as follows
- Any OS, preferably Linux
- Docker
- Azure cloud
Architecture
Technology used
- Django (Backend Rest API)
- React (Frontend)
- Postgres - as persistent database
- Docker
Azure public Cloud :
Azure cloud , it's a platform with more than 200 products and cloud services designed to help bring new solutions to life—to solve today’s challenges and create the future. We used this cloud to deploy the product manager application. Here is a list of used services:
-
Resource group: Azure Resource Groups are logical collections of azure service. it is used to group a collection of services to easy manage them.
-
ACR: A registry to store Docker images in azure cloud.
-
Postgres Database: One of azure services to manage postgresql databases.
-
Container: It is a service that enables developers to deploy containers without having to provision or manage any underlying infrastructure.
Folder structure:
Description of the folder structure:
- README.md: Documentation file
- src: the root folder for the app source code.
- prepare-app.sh: Script to build/tag/push our docker images and for deploying the app to the azure cloud using commands.
- stop-app.sh Script to stop and remove the app from azure.
Methode of communication:
For the communication between:
-
Backend and database: The credentials for database are passed to the backend application as environement variables.
-
Frontend and backend: For the connection between the frontend and backend, we used the nginx base image for our frontend image and we configured it to redirect all the api request to the backend url.
Run/stop the app
Prepare the app
The script will build/tag/push our docker images and deploy the app to the azure cloud using commands.
sh prepare-app.sh
To stop the app
The stop-app.sh
script will remove the resource group and all the services linked to that group.
Viewing the app
The link for the application will be print in the end of the prepare-app script.
Workflow:
1- I create resource group to group our application service in order to be able to manage them as unit.
2- I Create a azure container registry to store my application images.
3- I build,tag and push my application frontend backend images to the prevouis created registry.
4- I Create Postgresql database and update the firewall rule to allow external access to database.
5- I create the containers services(front/back) for the application and pass all the necessary env variables.