I am in the process of deploying an application using ACI on Azure. I generate the container using the so-called Compose file (Docker). Using my YML file (version 3), the images are formed and the instance is also created. However, Azure still seems to have problems with the creation of the volumes listed in the YML file. The storage account and file share already exist.
I would now like to create the folders for the volumes in the file share. However, it only creates one of eight folders (only the Git folder). Because of this some services can not be initialized/started, because they need the volumes/folders.
Below you can see my YML file:
Translated with www.DeepL.com/Translator (free version):
version: '3'
services:
sql:
image: registry.azurecr.io/sql
ports:
- "4663"
volumes:
- sql-init:/docker-entrypoint-initdb.d
- sql-data:/var/lib/sqlql/data/
depends_on:
- Application1
environment:
- SERVER_NAME="localhost"
- SERVER_DESC="Application1 docker-compose server"
- REPOSITORY_URL="http://git/git/Application1"
git:
image: registry.azurecr.io/gitserver
ports:
- "3554:3554"
volumes:
- git-data:/var/opt/git/
- git-config:/etc/subversion/
depends_on:
- sql
appSrv:
image: registry.azurecr.io/appSrv16
ports:
- "80:80"
- "35684:35684"
- "4266"
environment:
- EXTERNAL_HOST_NAME=localhost
- EXTERNAL_HOST_PORT=80
- DB_SCHEMA=dbSchema
links:
- sql:db
- git:git
volumes:
- deployments:/opt/jboss/appSrv/standalone/deployments/
- app1-home:/home/app1
- jboss-config:/opt/jboss/appSrv/standalone/configuration/
- clients:/home/clients/
- interface-init:/home/interface-init
depends_on:
- sql
- app1
- appSrv-init
app1: # Container is used for volumes initialization only - exits immediately.
image: registry.azurecr.io/app1612
entrypoint: /home/volumes_init.sh
environment:
- EXTERNAL_HOST_NAME=localhost
- EXTERNAL_HOST_PORT=6060
- EXTERNAL_HOST_git_PORT=80
- DEFAULT_WORKSPACE=false
- WS_ONLY=false
volumes:
- clients:/clients:rw
- deployments:/deployments:rw
- app1-home:/app1:rw
- sql-init:/home/sql_init:rw
- interface-init:/interface-init:rw
appSrv-init: # Container is used for initialization of appSrv configuration - exits immediately.
image: registry.azurecr.io/appSrv16_init
volumes:
- jboss-config:/configuration
volumes:
sql-data: # Database data
driver: azure_file
driver_opts:
share_name: fileshare1
storage_account_name: storageaccount
sql-init: # Initialization SQL scripts for database
driver: azure_file
driver_opts:
share_name: fileshare1
storage_account_name: storageaccount
deployments: # Deployments folder of an application server
driver: azure_file
driver_opts:
share_name: fileshare1
storage_account_name: storageaccount
app1-home: # App 1 home folder
driver: azure_file
driver_opts:
share_name: fileshare1
storage_account_name: storageaccount
jboss-config: # JBoss folder configuration
driver: azure_file
driver_opts:
share_name: fileshare1
storage_account_name: storageaccount
clients: # Contains archive with preconfigurated client environment
driver: azure_file
driver_opts:
share_name: fileshare1
storage_account_name: storageaccount
git-data: # git data folder
driver: azure_file
driver_opts:
share_name: fileshare1
storage_account_name: storageaccount
git-config: # git configuration folder
driver: azure_file
driver_opts:
share_name: fileshare1
storage_account_name: storageaccount
interface-init: # Folder for custom changes of deployment and client archive
driver: azure_file
driver_opts:
share_name: fileshare1
storage_account_name: storageaccount