skip to Main Content

I have an issue with Azure DevOps deployment, i’m getting this screen after successfully deploying an app, it does work on localhost but doesn’t work on Azure:

🙁 Application Error
If you are the application administrator, you can access the diagnostic resources.

This is my YAML file:

    pool:
  name: Azure Pipelines
steps:
- task: Docker@0
  displayName: 'Build an image'
  inputs:
    containerregistrytype: 'Container Registry'
    dockerRegistryConnection: companyname
    dockerFile: dockerfile.prod

- task: Docker@0
  displayName: 'Push an image'
  inputs:
    containerregistrytype: 'Container Registry'
    dockerRegistryConnection: companyname
    action: 'Push an image'

- task: AzureRmWebAppDeployment@4
  displayName: 'Azure App Service Deploy: sigmacem'
  inputs:
    azureSubscription: 'Azure subscription 1(86f0frg6-7177-40a1-2yi5-e1fc4be92716)'
    appType: webAppContainer
    WebAppName: companyname
    DockerNamespace: 'user/companyname:latest'
    DockerRepository: 'user/companyname:latest'

From building, pushing the docker image and from deploying to Azure Cloud.And also dockerfile.prod:

# build environment
FROM node:13.12.0-alpine as build
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
COPY package.json ./
COPY package-lock.json ./
RUN npm install --silent
RUN npm ci --silent
RUN npm install [email protected] -g --silent
COPY . ./
RUN npm run build

# production environment
FROM nginx:stable-alpine
COPY --from=build /app/build /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

Please, help me, because i’ve already tried so many solutions and not even once it worked on Azure cloud

2

Answers


  1. Chosen as BEST ANSWER

    I did managed to resolve that, unfortunately there was no answear on entire internet, and this was simple as just adding another component to the pipeline as changing the image name for: $(Build.Repository.Name):$(Build.BuildId) and registry from dockerhub


  2. I suppose that you could look into this doc for Enable diagnostics logging for apps in Azure App Service to check the diagnostic logs in Azure Portal.

    And you could also check if there is any access limitation for this web app.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search