Magento is an open source technology for e-Commerce platform. The platform makes it flexible and easy for merchants to control overall shopping cart system. It also provides powerful search engine optimization and powerful marketing. Containerizing Application is efficient as well as lightweight.
Azure Web App for Containers helps to smoothly deploy and run the containerized application on both Windows or Linux based environment. You can at any time scale up or scale down (For Web App for Container) as per your business needs.
Currently, we are deploying the Magento application as well as the database in the same Web App.
In this blog, my focus will be on how to deploy Multi-Container Magento based application on Web App for Container.
Follow the steps below:
Step 1: First you need to have an Azure Subscription.
Step 2: Select create a resource option. Search and select Web App for Container.
Step 3: To create Web App for Containers follow steps below:
Note: It is recommended to use minimum Premium P1V1 as pricing tier for Magento application
Step 4: To Configure container, follow the below steps:
Note: Replace your URL in MAGENTO_HOST with the docker-compose.yml file:
version: '2'
services:
mariadb:
image: 'bitnami/mariadb:latest'
environment:
- ALLOW_EMPTY_PASSWORD=yes
- MARIADB_USER=bn_magento
- MARIADB_PASSWORD=your_password
- MARIADB_DATABASE=bitnami_magento
volumes:
- 'mariadb_data:/bitnami'
magento:
image: 'bitnami/magento:latest'
environment:
- MARIADB_HOST=mariadb
- MARIADB_PORT_NUMBER=3306
- MAGENTO_DATABASE_USER=bn_magento
- MAGENTO_DATABASE_PASSWORD=your_password
- MAGENTO_DATABASE_NAME=bitnami_magento
- MAGENTO_HOST=magentoapp.azurewebsites.net
depends_on:
- mariadb
ports:
- '80:80'
- '443:443'
volumes:
- 'magento_data:/bitnami'
volumes:
mariadb_data:
driver: local
magento_data:
driver: local
Step 5: After your Web App is created
Step 6: Now go to Container settings then go to Logs, click on Refresh and you will see the following logs if your application is successfully deployed on Web App for container.
Finally you will see your Magento Application deployed through Web App for Container.