1

I'm having trouble deploying a SSR Nuxt.js app from Azure DevOps Pipelines to Azure App Service.

Disclaimers: ✅I have setup an Azure App Service with a Linux container. ✅I have added this to nuxt.config.js

  server: {
    host: '0.0.0.0'
  }

In Azure DevOps Pipelines I copy over these files after the build:

.nuxt/**
static/**
package.json
nuxt.config.js

then I zip them up as package.zip in the logs it shows it as successfully zipping the files but when I unzip the package none of the .nuxt files are present. I'm also confused that for some reason in the package.zip it puts all the build files in a folder named simply a/

archiving files You can see in the photo that it's creating the 'a' folder at the top and that it looks like all the files are being added to the archive. When I unzip the package.zip the only files that are in there are: * package.json * nuxt.config.js * /static

unzipped files

this is what my YAML file looks like:

trigger:
- master

pool:
  vmImage: 'ubuntu-latest'

steps:
- task: NodeTool@0
  inputs:
    versionSpec: '12.x'
  displayName: 'Install Node.js'

- script: |
    cd src/Web.Nuxt
    npm install
    npm run build
  displayName: 'npm install and build'

- task: CopyFiles@2
  inputs:
    SourceFolder: '$(Build.SourcesDirectory)/src/Web.Nuxt'
    Contents: |
      .nuxt/**
      static/**
      package.json
      nuxt.config.js
    TargetFolder: '$(Build.ArtifactStagingDirectory)'

- task: ArchiveFiles@2
  inputs:
    rootFolderOrFile: '$(Build.ArtifactStagingDirectory)'
    archiveType: 'zip'
    archiveFile: '$(Build.ArtifactStagingDirectory)/package.zip'
    replaceExistingArchive: true

- task: PublishBuildArtifacts@1
  inputs:
    PathtoPublish: '$(Build.ArtifactStagingDirectory)/package.zip'
    ArtifactName: 'drop'
    publishLocation: 'Container'

Any help would be greatly appreciated that can set me back on course to deploying a SSR Next.app with Azure DevOps Pipelines, Azure App Service, and a Nuxt SSR app. This has been tough to troubleshoot because in Azure DevOps Pipelines and Releases it says that everything was a success.

2
  • Also, a command ls -a can also help you find the missing folder. Commented May 20, 2020 at 6:09
  • Have you been successful in deploying your Nuxt SSR app to Azure App Service using Azure DevOps CI/CD? I do not see a reference to a web.config Commented Sep 3, 2020 at 19:52

1 Answer 1

0

Nothing wrong with this process. The .nuxt folder is just hidden folder in Linux environment. It's hidden instead of missing ~

For Linux: The folder whose name starts with .(dot) is considered as one hidden folder. There's many discussions online about this behavior, you can try this one.

If you download that package.zip file and unzip it in Windows environment, you can easily find the .nuxt folder:

enter image description here

Sign up to request clarification or add additional context in comments.

2 Comments

Wow I feel like an idiot :) So I guess I need to figure out why it creates an a folder. In Pipelines-Releases, I added a post-deployment inline script of cd a && npm i to get around that and try to get this app to spin up.....it creates the node modules folder but the nuxt web app is still not running on azure app service so must have some other issue.
The value of $(Build.ArtifactStagingDirectory) is some path/a/. So the a folder is the artifactstaging directory where your zip file exists.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.