Deploy NodeJS Application To Azure App Service Using GitHub Actions

Sdílet
Vložit
  • čas přidán 7. 09. 2024

Komentáře • 30

  • @srihariecomm
    @srihariecomm Před 3 měsíci +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  Před 3 měsíci

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

  • @Gio-m
    @Gio-m Před 7 měsíci +2

    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  Před 4 měsíci

      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.

  • @KamilNajax
    @KamilNajax Před měsícem +1

    very clear, thank you!

  • @kondekarvaishnavi2348
    @kondekarvaishnavi2348 Před 2 měsíci

    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.

  • @satislee
    @satislee Před 5 měsíci +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  Před 5 měsíci

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

  • @DynamicSQB
    @DynamicSQB Před 2 měsíci +1

    Backend deployed after that how to deploy frontend react

    • @IntegrationNinjas
      @IntegrationNinjas  Před 2 měsíci

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

  • @SEBASTIANTAMAYOLASSO
    @SEBASTIANTAMAYOLASSO Před 4 měsíci +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  Před 4 měsíci

      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.

  • @akshayratnakar9919
    @akshayratnakar9919 Před 5 měsíci +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  Před 4 měsíci

      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  Před 4 měsíci

      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.

  • @mohammadrizabul
    @mohammadrizabul Před 3 měsíci +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  Před 3 měsíci

      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.

  • @rmnp6513
    @rmnp6513 Před 5 měsíci +1

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

    • @IntegrationNinjas
      @IntegrationNinjas  Před 4 měsíci

      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

  • @assignmentdone7871
    @assignmentdone7871 Před 7 měsíci +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  Před 7 měsíci +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 Před 7 měsíci +2

      @@IntegrationNinjas thank you very much

  • @codeonion
    @codeonion Před 6 měsíci +2

    Thank you

  • @Thefactsby
    @Thefactsby Před 5 měsíci +1

    is http triger is same ?

    • @IntegrationNinjas
      @IntegrationNinjas  Před 3 měsíci

      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.

  • @ashrithah.a6742
    @ashrithah.a6742 Před 5 měsíci +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  Před 3 měsíci

      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 Před 8 měsíci +1

    First comment