Deploy NodeJS application to AWS EC2 using GitHub Actions

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 พ.ย. 2024

ความคิดเห็น • 70

  • @sangwonseo
    @sangwonseo 7 หลายเดือนก่อน +3

    *Mar 13 2024
    Runner name must be 'self-hosted' on deploy > runs-on property.
    For me, [aws-ec2] didn't work but 'runs-on: selft-hosted' worked.

    • @IntegrationNinjas
      @IntegrationNinjas  7 หลายเดือนก่อน +1

      I won’t deny this. I also observed the same behaviour recently and seems like this is changed in recent GitHub releases.

  • @brad4273
    @brad4273 ปีที่แล้ว +1

    Thank you for this awesome video.
    I successfully deploy nodejs to ec2.

  • @darshankhatri9625
    @darshankhatri9625 ปีที่แล้ว +3

    Thanks for sharing this , was looking for it .
    Very helpful.

  • @adityadhopade7727
    @adityadhopade7727 ปีที่แล้ว +1

    This has really good explaination ! waiting fro the next one on the github action front

  • @TheArunKushwahaa
    @TheArunKushwahaa ปีที่แล้ว +2

    Nice explanation, You covered the online tutorial gap, There is very less video on ci/cd with proper guide. you did it well, make more video on github, docker, aws,and jenkins, how this technology work togher, how to use this all in one project, this is the gap that no one is covering in theri tutoirals

    • @IntegrationNinjas
      @IntegrationNinjas  ปีที่แล้ว

      Thanks for your valuable feedback, i will definitely try.

  • @pixelgamevoyager
    @pixelgamevoyager ปีที่แล้ว +1

    Exact tutorial I was looking for on GitHub actions and deploying nodejs app on ec2. many thanks

  • @vivekjoshi1835
    @vivekjoshi1835 9 หลายเดือนก่อน +1

    Very helping video this the exact tutorial that I was looking for

  • @naylord5
    @naylord5 ปีที่แล้ว +2

    This is the exact tutorial I was looking for!
    Thank you so much for sharing your experience with the community.
    New sub!

  • @nabilafzal2984
    @nabilafzal2984 11 หลายเดือนก่อน +1

    Great video.. you explanation was awesome!

  • @TheUniversityGuy
    @TheUniversityGuy ปีที่แล้ว +2

    Nice explanation brother. Keep up the good work.😍

  • @vipinr8473
    @vipinr8473 9 หลายเดือนก่อน +1

    Best tutorial, Top notch explanation, understandable. The exact tutorial that covers all the topics that a beginner could understand. Thank you very much for your effort

    • @IntegrationNinjas
      @IntegrationNinjas  9 หลายเดือนก่อน

      Glad it was helpful! And this motivates me a lot to perform my best.

  • @ekremcemilpasa6987
    @ekremcemilpasa6987 11 หลายเดือนก่อน +1

    Thank you so much! That is really helpful!

  • @1306dk
    @1306dk 6 หลายเดือนก่อน +1

    Hey, I really like your content. Very informative. Could you perhaps do a video on deploying an angular application with ssr, using github actions, docker, github container registry and deploying it to aws ?

    • @IntegrationNinjas
      @IntegrationNinjas  6 หลายเดือนก่อน

      Thanks and great suggestion! I will look into that.

    • @1306dk
      @1306dk 6 หลายเดือนก่อน

      @@IntegrationNinjas Thanks, would be greatly appreciated! I guess a more common route would be to use the ECR of Aws for images, but im interested to see how it would work with github container registries :)

  • @ecanalysis7589
    @ecanalysis7589 ปีที่แล้ว +2

    Nice video 👍

  • @josueperezf
    @josueperezf ปีที่แล้ว +1

    Saludos amigo, me pareció excelente el contenido, muchas Gracias

  • @hillarykiptoo4696
    @hillarykiptoo4696 11 หลายเดือนก่อน +1

    This helped me

  • @hvg495
    @hvg495 7 หลายเดือนก่อน +1

    Good video 👍

    • @IntegrationNinjas
      @IntegrationNinjas  7 หลายเดือนก่อน +1

      Glad it helped!

    • @hvg495
      @hvg495 7 หลายเดือนก่อน +1

      @@IntegrationNinjas yes!

  • @manojmohapatra986
    @manojmohapatra986 24 วันที่ผ่านมา

    I appreciate the content. But it has some missing concepts like building docker images for different environments. I as a devops professional feels targeting different environments is something which you must cover. Just an idea 😊😊

  • @lucasdecapra8544
    @lucasdecapra8544 ปีที่แล้ว +1

    Hey dude, nice vid! What do you suggest to handle the .env file? My project doesn't run because my ec2 machine doesn't have access to my .env file (cause it's secret, and cannot be in the remote repo). How could i handle it?

    • @IntegrationNinjas
      @IntegrationNinjas  ปีที่แล้ว

      I would suggest to add .env details in github repository secret variables. Otherwise you can store these information in vault also, if your runner is running on ec2 then you can access those information from vault.

    • @subhajitbar1697
      @subhajitbar1697 5 หลายเดือนก่อน

      ​@@IntegrationNinjas adding .env details on github secrets will not work on ec2 containers as per the process you have shown. I have already try it by myself. We must have to add .env to dockerignore for best practices, we can't build images which includes our env secrets and push it to dockerhub. Which you did not even show us. Just don't write down anything before checking it by yourself, and make videos with complete information.

  • @manojmohapatra986
    @manojmohapatra986 หลายเดือนก่อน

    On push stratergy is good but on demand is much practical if a large numbers of developers are pushing code frequently

    • @IntegrationNinjas
      @IntegrationNinjas  29 วันที่ผ่านมา

      That's correct, we need to change the strategy here in real time projects. We can go with manual workflow dispatch, scheduled deployments and deployment on merge to a specific branch. We can define a use case and accordingly we can decide the right strategy. Please refer: docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/triggering-a-workflow

    • @manojmohapatra986
      @manojmohapatra986 29 วันที่ผ่านมา

      @@IntegrationNinjas u got a new subscriber.. great content 👍

  • @Krishna-ih1cv
    @Krishna-ih1cv ปีที่แล้ว +1

    can you also uplode video on react app deployment on aws ec2 and s3 also include ETL

    • @IntegrationNinjas
      @IntegrationNinjas  ปีที่แล้ว

      If you want to deploy to react app just you need to update docker file and rest of process remains same, but surely i will create a video on it.

  • @akhandpratapsinghhbtu9622
    @akhandpratapsinghhbtu9622 10 หลายเดือนก่อน +1

    ❤❤❤❤

  • @理想余九天
    @理想余九天 11 หลายเดือนก่อน +1

  • @Simple38
    @Simple38 ปีที่แล้ว

    Sir kindly make a video how to create a docker customer image and add github actions to that and accessing our project in github codespaces it will definitely reduce many developer's job . I meant developers can work fastly

    • @IntegrationNinjas
      @IntegrationNinjas  ปีที่แล้ว

      Nice to hear feedback, steps to create docker image are already there. And will soon start with GitHub Codespaces as well. And if you can more elaborate your query, it will be good.

  • @warrior_pk
    @warrior_pk 8 หลายเดือนก่อน +1

    How to manage environment variables used in nodejs server. Where to store it ?

    • @IntegrationNinjas
      @IntegrationNinjas  8 หลายเดือนก่อน +1

      You can store environment variable details in GitHub secrets and then you can access those variables in your workflow.
      While building docker image you need to pass build arguments and set them in docker file.
      Ex: docker build -t your-image-name --build-arg API_KEY=${{ secrets.API_KEY }} .
      While in docker file you can set these as:
      # Dockerfile
      FROM node:14
      # Set environment variable
      ARG API_KEY
      ENV API_KEY=$API_KEY
      # Other Dockerfile instructions

    • @warrior_pk
      @warrior_pk 8 หลายเดือนก่อน +1

      @@IntegrationNinjas thank u so much. This video is really helpful. It is exactly what i needed...

    • @IntegrationNinjas
      @IntegrationNinjas  8 หลายเดือนก่อน +1

      Keep Learning.

  • @lost_and_finding
    @lost_and_finding 8 หลายเดือนก่อน +1

    there's no job in my runner what could be the issue i am using IAM user credentials.

    • @IntegrationNinjas
      @IntegrationNinjas  8 หลายเดือนก่อน

      Workflow was triggered or it was showing waiting for runner to pickup job?

  • @user-fs3ff5me5w
    @user-fs3ff5me5w ปีที่แล้ว +1

    my docker pull when deploy take so long time, can u help me

    • @IntegrationNinjas
      @IntegrationNinjas  ปีที่แล้ว +1

      It probably depends on your network connection, Firewall or proxy blocking Docker traffic, Registry congestion, Local disk performance.
      Try out above options if it doesn’t work try updating your docker version or use another tool to pull images from docker.

    • @user-fs3ff5me5w
      @user-fs3ff5me5w ปีที่แล้ว +1

      @@IntegrationNinjas thanks so much

  • @subhajitbar1697
    @subhajitbar1697 5 หลายเดือนก่อน +1

    You didn't show how .env file will be created in ec2.

    • @IntegrationNinjas
      @IntegrationNinjas  4 หลายเดือนก่อน

      You can create it on run time as well like below:
      - name: Create .env file
      run: echo "MONGO_PASSWORD=${{ secrets.MONGO_PASSWORD }}" >> .env && echo "SITE_URL=${{ secrets.SITE_URL }}" >> .env
      Store secrets in GitHub secrets.

  • @vaibhav.v6403
    @vaibhav.v6403 ปีที่แล้ว +2

    Where is a frontend jenkins far better than this but i dont know why companeis using github actions 🤔

    • @IntegrationNinjas
      @IntegrationNinjas  ปีที่แล้ว

      GitHub Actions is a newer tool that is tightly integrated with GitHub. This means that you can use GitHub Actions to automate your workflows directly from your GitHub repository. GitHub Actions also uses a YAML-based syntax for creating workflows, which is more concise and easier to read than the syntax used by Jenkins.

    • @manojmohapatra986
      @manojmohapatra986 9 หลายเดือนก่อน

      Also jenkins can access to your git. But github tools are far superior and debuging failed jobs are preety good with good community support

  • @reactjs1900
    @reactjs1900 ปีที่แล้ว +1

    self-hosted runners goes offline after some days , i have tried by increasing the storage in ec2 also but no way , what are the possible reasons

    • @IntegrationNinjas
      @IntegrationNinjas  ปีที่แล้ว

      There might be many reasons.
      By default, GitHub Actions runners have an idle timeout. If the runner remains idle for a certain period, it can automatically go offline to save resources. You can configure the runner to run as a service to avoid this issue.
      Follow the below steps as mentioned in the documentation:
      docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/configuring-the-self-hosted-runner-application-as-a-service
      Make sure your AWS EC2 instance is up and running.

  • @HappyCougar-kc5xz
    @HappyCougar-kc5xz 7 หลายเดือนก่อน +1

    hi

  • @akhandpratapsinghhbtu9622
    @akhandpratapsinghhbtu9622 10 หลายเดือนก่อน +1

    ❤❤❤❤❤