Home > Blockchain >  Why am I getting Application Error on Azure Devops Deploy?
Why am I getting Application Error on Azure Devops Deploy?

Time:01-05

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: sigmacem
    dockerFile: dockerfile.prod

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

- task: AzureRmWebAppDeployment@4
  displayName: 'Azure App Service Deploy: sigmacem'
  inputs:
    azureSubscription: 'Azure subscription 1(86f0fad6-7177-40a1-9ec3-e1fc4be89543)'
    appType: webAppContainer
    WebAppName: sigmacem
    DockerNamespace: 'mariuszkuc24/sigmacem:latest'
    DockerRepository: 'mariuszkuc24/sigmacem: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

CodePudding user response:

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.

CodePudding user response:

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

  • Related