I am in the early stages of a development project -- and trying to nail down the CI/CD pipeline. I am running into some confusion while trying to deploy multiple docker containers into a single Azure App Service. Here is the outline of what I am trying to achieve, with as much detail along the way. Any guidance on where I am going wrong would be very appreciated. I've put checkmarks next to the items I
believe I already have configured correctly.
- Merge code to the master branch of a Github repository ?
- Have an Azure DevOps Pipeline automatically trigger?
- Have an Azure DevOps Release Pipeline with multiple stages for release to QA/Prod environments ?
- Add a variable to be set at Release Creation for which BuildId (from the pipeline laid out above) I'm looking to target
- Add the artifact from above
- Have 2 stages, QA and Prod
- Each stage simply runs a "Azure Web App on Container Deploy" task
- I set "Image name" equal to my 3 services from the ACR
myacrrepo.azurecr.io/service1:$(BuildId)
myacrrepo.azurecr.io/api1:$(BuildId)
myacrrepo.azurecr.io/service2:$(BuildId)
- I set "Configuration File" to the docker-compose.yml in the artifact
$(System.DefaultWorkingDirectory)/_david#####.#####/drop/docker-compose.yml
- YML for this step
steps:
- task: AzureWebAppContainer@1
displayName: 'Azure Web App on Container Deploy'
inputs:
azureSubscription: 'MYSUB'
appName: myapname
containers: |
myacrrepo.azurecr.io/service1:$(BuildId)
myacrrepo.azurecr.io/api1:$(BuildId)
myacrrepo.azurecr.io/service2:$(BuildId)
multicontainerConfigFile: '$(System.DefaultWorkingDirectory)/_david#####.#####/drop/docker-compose.yml'
When all is said and done, and this release pipeline runs -- my App Service ends up being configured to grab its images from Docker Hub -- and the container images fail to pull because there are no docker hub credentials filled and the image names on my docker-compose.yml file aren't valid (e.g., "${DOCKER_REGISTRY-}api1")
I've never used docker before, so I'm struggling to get through this properly. I've tried to include as much info as possible, if there is something else you'd need please let me know -- again any help is much appreciated.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…