Deploy NodeJS Application To Azure App Service Using GitHub Actions

Поделиться
HTML-код
  • Опубликовано: 16 ноя 2024

Комментарии • 32

  • @Gio-m
    @Gio-m 9 месяцев назад +3

    Props man! You actually made this process very clear to understand, thank you! Btw how different would it be uploading a Docker container to Azure? I see you have videos for Docker to AWS, but I imagine it'd be different. Anyways subscribed!

    • @IntegrationNinjas
      @IntegrationNinjas  7 месяцев назад +1

      Thanks for the kind words and subscribing! I'm glad you found the tutorial clear. You're right, deploying a Docker container to Azure App Service has some key differences compared to deploying a Node.js application directly. I will try to create that video soon.

  • @srihariecomm
    @srihariecomm 6 месяцев назад +2

    neatly explained, small request, try to avoid circling your mouse pointers, its very much annoying as some of us follow your pointer to understand where you are pointing at

    • @IntegrationNinjas
      @IntegrationNinjas  5 месяцев назад

      I am trying to improve it slowly and not doing this in recent videos. Thanks for pointing out the pain points.

  • @KamilNajax
    @KamilNajax 4 месяца назад +1

    very clear, thank you!

  • @akshayratnakar9919
    @akshayratnakar9919 7 месяцев назад +1

    Thanks. I have a doubt, my backend folder is nested in repo. Like at repo I have 2 folders Backend and Frontend. I want to deploy Backend to azure, also where I can pass env variables?

    • @IntegrationNinjas
      @IntegrationNinjas  7 месяцев назад

      In your GitHub Actions workflow file, you can define a specific path for the backend folder during deployment.
      Refer below example:
      - name: npm install (backend only)
      run: cd Backend && npm install
      - name: Build (backend only)
      run: cd Backend && npm run build # Replace with your build command
      - uses: azure/webapps-deploy@v2
      with:
      app-name: ''
      publish-profile: ${{ secrets.AZURE_APP_SERVICE_PUBLISH_PROFILE }}
      package: 'Backend' # Specify backend folder path
      For more reference you can see the inputs supported by this azure action here: github.com/Azure/webapps-deploy/blob/master/action.yml#L15

    • @IntegrationNinjas
      @IntegrationNinjas  7 месяцев назад

      For setting environment variables you can create a .env file at run time and can store all variables at GitHub Secrets.
      Something like this
      - name: Create .env file
      run: echo "MONGO_PASSWORD=${{ secrets.MONGO_PASSWORD }}" >> .env
      You should create this file before building the app.

  • @assignmentdone7871
    @assignmentdone7871 10 месяцев назад +1

    Can you please help me, my question is How do I access environment variables that I have used in my Nodejs , do I need to upload the .env on azure?

    • @IntegrationNinjas
      @IntegrationNinjas  10 месяцев назад +1

      Here's how to manage environment variables for your Node.js app in Azure App Service:
      Set Variables in Azure App Service:
      Access your Azure portal and navigate to your App Service.
      Under "Settings" > "Configuration", find "Application settings".
      Add your environment variables here, using the format KEY=VALUE.
      Don't upload .env files to Azure. Configure variables directly in the App Service configuration.
      Sensitive values (passwords, API keys) should be stored as Azure App Service secrets for enhanced security.
      Restart your App Service after making changes to environment variables.
      Reference: learn.microsoft.com/en-us/azure/app-service/configure-common?tabs=portal

    • @assignmentdone7871
      @assignmentdone7871 10 месяцев назад +2

      @@IntegrationNinjas thank you very much

  • @bigmeaty2147
    @bigmeaty2147 Месяц назад

    When I pushed my code, it said on git that it sucessfully build and deployed, but when i click the link on azure to get to my webapp, i get Application Error

  • @SEBASTIANTAMAYOLASSO
    @SEBASTIANTAMAYOLASSO 6 месяцев назад +1

    Hi! Thanks for this video. I have a question, my backend is made on nest js, i need to deploy in web app but azure return an “application error” when finish the deploy with github action. Do you know how fix it ?

    • @IntegrationNinjas
      @IntegrationNinjas  6 месяцев назад

      Hey! Thanks for the question.
      "Application error" can be tough to diagnose. Here are some tips:
      Check Azure App Service Logs for error details.
      Review GitHub Actions workflow logs for deployment issues.
      Consider common problems like missing environment variables, dependencies, or incorrect build configuration.
      Search online for "[NestJS deployment error Azure App Service]" for solutions. Share the specific error message if you need more help.

  • @rmnp6513
    @rmnp6513 7 месяцев назад +1

    how can i deploy from ./server folder in my main branch

    • @IntegrationNinjas
      @IntegrationNinjas  7 месяцев назад

      In your GitHub Actions workflow file, you can define a specific path for the backend folder during deployment.
      Refer below example:
      - name: npm install (backend only)
      run: cd Backend && npm install
      - name: Build (backend only)
      run: cd Backend && npm run build # Replace with your build command
      - uses: azure/webapps-deploy@v2
      with:
      app-name: ''
      publish-profile: ${{ secrets.AZURE_APP_SERVICE_PUBLISH_PROFILE }}
      package: 'Backend' # Specify backend folder path
      For more reference you can see the inputs supported by this azure action here: github.com/Azure/webapps-deploy/blob/master/action.yml#L15

  • @kondekarvaishnavi2348
    @kondekarvaishnavi2348 4 месяца назад

    Your .yml file also showing failure. and If I add the yml file of urs by replacing with my credentiails and stuff it is not even building. How to fix that bro.

  • @DynamicSQB
    @DynamicSQB 4 месяца назад +1

    Backend deployed after that how to deploy frontend react

    • @IntegrationNinjas
      @IntegrationNinjas  4 месяца назад

      You can follow same approach. I will try to create tutorial soon.

  • @ArchIntelLTD
    @ArchIntelLTD Месяц назад

    God bless you greatly

  • @mohammadrizabul
    @mohammadrizabul 6 месяцев назад +1

    504.0 GatewayTimeout azure app service error , I have deployed backend , but when i use the api from postman to get access of the route , then it does not response and take infinte time till 504 error shows , and in browser the server goes in infite loading and will not load .

    • @IntegrationNinjas
      @IntegrationNinjas  6 месяцев назад

      Surely there's some issue in app startup, check the Azure App Service logs for any error messages that might indicate the cause of the timeout. You can access logs through the Azure portal or tools like Azure Monitor.

  • @satislee
    @satislee 7 месяцев назад +1

    thanks a lot! I really needed this a lot so thank you so much. you just earned a subscriber. but can you please stop spinning your cursor? its kinda annoying

    • @IntegrationNinjas
      @IntegrationNinjas  7 месяцев назад

      Thanks for the sub and feedback. It will help me to improve a lot.

  • @Manu_krishnan
    @Manu_krishnan 8 месяцев назад +1

    is http triger is same ?

    • @IntegrationNinjas
      @IntegrationNinjas  6 месяцев назад

      Yes, an HTTP trigger in Azure Functions is very similar to what you might encounter in other cloud platforms and frameworks.These triggers allow your Azure Function to be invoked whenever an HTTP request is received. This means your function can respond to web requests, API calls, or any other communication that uses the HTTP protocol.

  • @codeonion
    @codeonion 8 месяцев назад +2

    Thank you

  • @ashrithah.a6742
    @ashrithah.a6742 7 месяцев назад +1

    Bro, although logs are successful facing this error: The resource you are looking for has been removed, had its name changed, or is temporarily unavailable. You do not have permission to view this directory or page. Bro how to contact you? Please help

    • @IntegrationNinjas
      @IntegrationNinjas  6 месяцев назад

      Double-check your GitHub Actions workflow and ensure it deploys the correct files and configurations to the intended location within your Azure App Service.
      Review App Service Settings: In the Azure portal, navigate to your App Service and verify settings like:
      Deployment Center: Make sure you're deploying to the correct deployment center (e.g., "Slot" or "Production").
      Configuration Variables: Confirm that any environment variables needed by your application are set correctly in the App Service settings.

  • @sourabhmishra1410
    @sourabhmishra1410 10 месяцев назад +1

    First comment