Reputation:
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/
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
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.
Upvotes: 1
Views: 3433
Reputation: 28176
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:
Upvotes: 0