Created
February 29, 2024 19:40
-
-
Save theisof/5b08d932c220a19616e89e4d364ead26 to your computer and use it in GitHub Desktop.
Deploy Next.js on Azure App Service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# build and zip, then... | |
steps: | |
- task: AzureRmWebAppDeployment@4 | |
displayName: Publish $(app_name) | |
inputs: | |
ConnectionType: "AzureRM" | |
azureSubscription: "$(azure_subscription)" | |
appType: "webAppLinux" | |
WebAppName: "$(app_name)" | |
packageForLinux: "$(System.DefaultWorkingDirectory)/app.zip" | |
RuntimeStack: "NODE|18-lts" | |
StartupCommand: "pm2 start ecosystem.config.js --no-daemon" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
apps: [ | |
{ | |
name: "my-app", | |
script: "./node_modules/next/dist/bin/next", | |
args: "start -p " + (process.env.PORT || 3000), | |
}, | |
], | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment