Azure container instance
To deploy UI Bakery to an Azure container instance, follow these steps:
- Login docker to Azure. 
docker login azure- Create a docker context. 
docker context create aci uibakery- Use new context. 
docker context use uibakery- Clone ui bakery self-hosted repository. 
git clone https://github.com/uibakery/self-hosted.git && cd self-hosted- UI Bakery requires db to persist its data. So it's necessary to create one. We suggest you use Azure Database for MySQL. 
- Set - UI_BAKERY_LICENSE_KEYvariable in docker-compose-azure-container-instances.yml for- bakery-backservice.
UI_BAKERY_LICENSE_KEY=${UI_BAKERY_LICENSE_KEY:-eyJhbGciOiJIUz}- Set - UI_BAKERY_DB_*variables in docker-compose-azure-container-instances.yml for- bakery-backservice.
UI_BAKERY_DB_HOST=${UI_BAKERY_DB_HOST:-azure-container-instance-test-db.mysql.database.azure.com}
UI_BAKERY_DB_PORT=${UI_BAKERY_DB_PORT:-3306}
UI_BAKERY_DB_DATABASE=${UI_BAKERY_DB_DATABASE:-bakery}
UI_BAKERY_DB_USERNAME=${UI_BAKERY_DB_USERNAME:-uibakeryuser@azure-container-instance-db}
UI_BAKERY_DB_PASSWORD=${UI_BAKERY_DB_PASSWORD:-uibakerypassword}- Up the Azure container instance. 
docker compose -f docker-compose-azure-container-instances.yml up- Find the assigned IP address. Run - docker psand in column PORTS you'll find the assigned IP address.
- Replace all occurrences of - UI_BAKERY_APP_SERVER_NAMEwith the IP address retrieved in the previous step.
UI_BAKERY_APP_SERVER_NAME=https://123.123.123.123- Restart the instance to apply the new configuration. 
docker compose -f docker-compose-azure-container-instances.yml upLast updated
Was this helpful?