Deploy Docker project in ElasticBeanstalk

Sdílet
Vložit
  • čas přidán 26. 07. 2024
  • PS: ElasticBeanstalk console now looks a bit different since AWS updated it, but the core concepts are still the same
    In this video, you will learn how to deploy a Docker project in ElasticBeanstalk and you will also learn how to solve the most common problems that happen in the process:
    - Timeout due to big Dockerfiles
    - Using ECR to create a preconfigured Docker image
    - Handling different architectures: ARM64 and X86
    - Grant IAM permissions for ElasticBeanstalk to pull the ECR image
    The project was a NestJS(NodeJS) project using Yarn to manage packages. One of the packages was 'bcrypt', which is a library to manage user password encryption, which requires Python3 to be installed on the machine.
    Helpful links:
    - docs.aws.amazon.com/elasticbe...
    - docs.aws.amazon.com/elasticbe...
    0:00 - Introduction
    1:30 - Create ElasticBeanstalk project
    5:55 - Upload zipped code to ElasticBeanstalk
    7:54 - Solving timeout issue
    10:12 - Create ECR project
    14:40 - Using ECR into Dockerfile
    15:00 - Zip updated project and upload to ElasticBeanstalk
    16:20 - Observations related to ARM64/X86 architecture
    18:20 - Grant IAM permissions for ECR
    19:55 - Conclusion
  • Věda a technologie

Komentáře • 27

  • @kumailn7662
    @kumailn7662 Před 7 měsíci +1

    Man you are simply great, while demonstrating the technique.

  • @gabrielvaladares4972
    @gabrielvaladares4972 Před rokem +1

    The best teacher of The online world

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

    If im not wrong, you can use bcrypt-js and dont depend on python. Awesome video :)

    • @computingpower
      @computingpower  Před měsícem

      Interesting! I didn’t know about that. Thanks for letting me know :)

  • @LucasoMontarroyos
    @LucasoMontarroyos Před rokem +1

    Excellent!

  • @gabrielvaladares4972
    @gabrielvaladares4972 Před rokem +1

    He makes my app. Recomendo

  • @wellianeoliveira2302
    @wellianeoliveira2302 Před rokem +1

    Great

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

    Thanks for the video. Does ElasticBeanstalk detect that the exposed port of your container is 4000 and maps port 80 of the host to your container's port?

    • @computingpower
      @computingpower  Před 5 měsíci

      Hello, thanks for the question! By default, AWS uses port 5000 on an app.
      But you can use a custom port by passing a PORT environment variable on ElasticBeanstalk docs.aws.amazon.com/elasticbeanstalk/latest/dg/nodejs-platform-proxy.html
      - If that doesn't work, you can also override the NGINX configuration on ElasticBeanstalk and set another port on NGINX stackoverflow.com/questions/66074722/what-is-the-port-number-of-the-web-application-to-which-default-proxy-config-on

  • @hectorlopez9393
    @hectorlopez9393 Před rokem +1

    thanks sir, really helpfull

  • @bigchallenge7987
    @bigchallenge7987 Před 10 měsíci

    How much was the docker file size when you try to deploy first and it failed?

    • @computingpower
      @computingpower  Před 10 měsíci

      Sorry, it's been a while since I did this project. 😅 But if I remember well, the first issue was caused due to timeout to run all steps, not necessarily because the Docker file was too big. So, creating a new Docker file to cache some steps was required.

  • @Dmitrii-Kalashnikov
    @Dmitrii-Kalashnikov Před 5 měsíci +1

    Thank you, I like your approach it helped me

  • @AleksandarT10
    @AleksandarT10 Před rokem +1

    If i am running on an x64 machine, how are we able to build an image for arm64?

    • @computingpower
      @computingpower  Před rokem

      I think that the easiest way to do it is to generate the image in an EC2 instance with ARM64 architecture

  • @Saitama-ur3lq
    @Saitama-ur3lq Před rokem

    you are not using bcrypt to "encrypt" passwords, you are using bcrypt to "hash" them,, there is a huge difference

  • @gustavostnt
    @gustavostnt Před měsícem

    After 3 days of trying to get it to work, I'm giving up

    • @computingpower
      @computingpower  Před měsícem

      Hey what was the problem?

    • @gustavostnt
      @gustavostnt Před měsícem

      @@computingpower It just complains that it expected my app to be version "sample" instead of 1

    • @computingpower
      @computingpower  Před měsícem

      @@gustavostnt Is this on the ElasticBeanstalk console?

    • @gustavostnt
      @gustavostnt Před měsícem

      @@computingpower Yes, the web UI. I'll be using just regular RDS + EC2 for now