ricardocanelas / nextjs-dynamic-azure-example

It's a temp repository for testing deploy into azure

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is a Next.js project bootstrapped with create-next-app.

Getting Started

First, run the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

Deploy on Azure App Service

Azure

  • Create resource / Web App

    • Publish: Code
    • Node: 12 LTS
    • Operation System: Linux
  • On the resource, go to Settings / Configuration

    • In General Settings:
      • Major version: LTS
      • Startup Command: yarn start:azure or npm run start:azure
  • On the resource, go to Settings / Configuration

    • In Application settings
      • Add new variables:
        • PORT = 80
        • WEBSITE_NODE_DEFAULT_VERSION = 12-lts (it is optional)

If you want to use web.config, there're few examples: 01, 02, 3, 4, 5, 6 and the options of the file.

Github

  • In your repository https://github.com/<my-user>/<my-repo>/settings/secrets
  • Add Secret value
    • name: AZURE_APPSERVICE_PUBLISH_PROFILE
    • value: <azure-portal/your-app-service-resource/settings/deployment-center/deployment-credentials/get-publish-profile>
  • Go to https://github.com/<my-user>/<my-repo>/actions/new
    • Click on Set up a workflow yourself button
    • Include this content as an example.. 01 02 3 4

More Tips

About

It's a temp repository for testing deploy into azure


Languages

Language:JavaScript 100.0%