First time using Azure.
I have the following docker-compose.yml (some values X’d here for security)
version: '2'
services:
mariadb:
image: docker.io/bitnami/mariadb:10.6
environment:
- MARIADB_USER=bn_moodle
- MARIADB_PASSWORD=XXXXX
- MARIADB_ROOT_PASSWORD=XXXXX
- MARIADB_DATABASE=bitnami_moodle
- MARIADB_CHARACTER_SET=utf8mb4
- MARIADB_COLLATE=utf8mb4_unicode_ci
volumes:
- 'mariadb_data:/bitnami/mariadb'
moodle:
image: docker.io/bitnami/moodle:3
ports:
- '80:80'
- '443:443'
environment:
- BITNAMI_DEBUG=true
- MOODLE_DATABASE_HOST=mariadb
- MOODLE_DATABASE_PORT_NUMBER=3306
- MOODLE_DATABASE_USER=bn_moodle
- MOODLE_DATABASE_NAME=bitnami_moodle
- MOODLE_DATABASE_PASSWORD=XXXXX
- MOODLE_DATABASE_ROOT_PASSWORD=XXXXX
- MOODLE_SITE_NAME=XXXXX
- MOODLE_USERNAME=XXXXX
- MOODLE_PASSWORD=XXXXX
volumes:
- 'moodle_data:/bitnami/moodle'
- 'moodledata_data:/bitnami/moodledata'
depends_on:
- mariadb
volumes:
mariadb_data:
driver: local
moodle_data:
driver: local
moodledata_data:
driver: local
This docker-compose yml file works locally and on an AWS linux server that I can ssh into.
However, I am trying to provide this to Azure "Web App for Containers" service.
The main question I have is what is the purpose of this part of the setup wizard?
The options are docker hub, azure container registry, and private registry.
The images I want to deploy though are part of bitnami. They have a name like docker.io/bitnami/mariadb:10.6
. How can I ensure that when I run this service the images will be able to download.
If I choose either the Docker Hub option or the Azure option and upload my YML file, no errors appear but also the app is not reachable at the provided URL. It just hangs on black screen forever in browser.
Note I am aware that you can spin up a moodle VM on Azure in other ways, the point of this is to try and learn about the "Web App for Containers" service.
Once created here are the options I see in the menu:
Overview
Activity log
Access control (IAM)
Tags
Diagnose and solve problems
Microsoft Defender for Cloud
Events (preview)
Deployment
Quickstart
Deployment credentials
Deployment slots
Deployment Center
Settings
Configuration
Authentication
Application Insights
Identity
Backups
Custom domains
TLS/SSL settings
Certificates (preview)
Networking
Scale up (App Service plan)
Scale out (App Service plan)
WebJobs
Push
MySQL In App
Service Connector
Properties
Locks
App Service plan
App Service plan
Quotas
Change App Service plan
Development Tools
Clone App
SSH
Advanced Tools
Extensions
API
API Management
API definition
CORS
Monitoring
Alerts
Metrics
Logs
Advisor recommendations
Health check
Diagnostic settings
App Service logs
Log stream
Log stream (preview)
Process explorer
Automation
Tasks (preview)
Export template
Support + troubleshooting
Resource health
App Service Advisor
New Support Request
2
Answers
In the compose file, simply refer to bitnami/mariadb:10.6. You don’t have to specify docker.io.
Also note that depends_on is ignored and there’s no need to specify port 443 as App Service does TLS termination.
i may be wrong but i think it won’t work simply because there’s a compatibility problem when it come to Docker-compose (preview) port, by that i mean that the only port that will work should either be 80 or 8080.
https://learn.microsoft.com/en-us/azure/app-service/configure-custom-container?pivots=container-linux#docker-compose-options
https://i.stack.imgur.com/1LZBE.png