0

I am trying to run Mautic as an Azure App for Container and have enabled WEBSITES_ENABLE_APP_SERVICE_STORAGE to use Azure Storage. I have followed the steps mentioned here https://github.com/MicrosoftDocs/azure-docs/issues/55046 to configure Azure Storage mount with a file share in the Docker container.

However, I am encountering an error during startup with the message Mautic not found in /var/www/html - copying now....

I have verified that the files are successfully copied to the Azure File Storage, but the error persists.

enter image description here

Below is my docker-compose.yml configuration:

version: "3"

services:
  mautic:
    image: mautic/mautic:v4-apache
    volumes:
      - mouticdatamount:/var/www/html
    environment:
      - MAUTIC_DB_HOST=mydb.mysql.database.azure.com
      - MAUTIC_DB_USER=mydbuser
      - MAUTIC_DB_PASSWORD=mydbpassword
      - MAUTIC_DB_NAME=mydbname
    restart: always

Here is the error I am getting:

2023-07-15T07:20:25.335Z INFO  - docker run -d -p 9560:80 --name myhost_mautic_0_3cb64f5a -e WEBSITES_ENABLE_APP_SERVICE_STORAGE=true -e WEBSITE_SITE_NAME=myhost -e WEBSITE_AUTH_ENABLED=False -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=hostname.azurewebsites.net -e WEBSITE_INSTANCE_ID=7e65b7bfda61c0327cd6b05b68172e68b22e90752de61b8d5f6484746acfcd5d -e HTTP_LOGGING_ENABLED=1 -e WEBSITE_USE_DIAGNOSTIC_SERVER=False mautic/mautic:v4-apache  

2023-07-15T07:24:16.260Z ERROR - multi-container unit was not started successfully
2023-07-15T07:24:16.261Z INFO  - Container logs from myhost_mautic_0_3cb64f5a = 2023-07-15T07:20:25.831636447Z Mautic not found in /var/www/html - copying now...

2023-07-15T07:24:21.707Z INFO  - Stopping site myhost because it failed during startup.
2023-07-15T07:30:33.880Z INFO  - Starting multi-container app..
Krunal
  • 2,967
  • 8
  • 45
  • 101

1 Answers1

0

I get it working after trying out several things.

I updated the mount path to final folder instead of whole path. I am not sure if this helped solve it. So final mount is like this. Previously it was /var/www/html

enter image description here

Also, I updated the Azure setting for container WEBSITES_CONTAINER_START_TIME_LIMIT to 1800.

And finally, it took almost 18-20 min to get everything ready. I believe this was due to the time out which was caused by docker while copying the required files during running mautic container.

Krunal
  • 2,967
  • 8
  • 45
  • 101