Deploy spring web apps to cloud | using Railway.app

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ก.พ. 2023
  • Part 1 of multipart series where simple java spring mvc web app is secured by spring security framework. Authentication is also enabled by gmail and github social login oath2/oidc providers and users saved to relational database.
    App is deployed to various cloud providers.
    In part 1, we create java spring web app and deployed it to railway.app, cloud infrastructure provider.
    Railway.app:
    tinyurl.com/railway-kanezi
    Github repo:
    github.com/kanezi/spring-soci...

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

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

    I am so glab I found your channel. I have been looking for this kind of tutorial for a while. Thank you

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

      welcome to the channel! I'm glad you found it too! :)

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

    I really appreciate your efforts to explain relevant stuffs in Spring Boot! I just had a quick look through all your uploaded videos, and that's exactly everything I wanted to learn. Keep going 🥳

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

      Also suggest you to add email/twitter in your youtube! I may send you some topics which are tough and nobody covers!

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

    So much information that I looking for, found it hear thank y so much. Just one question Sir. iam nw with docker and docker hub compose and all of these things. I have a Spring Boot app that connect to Postgres DB . how can I create ONE image and push it to docker hub so that wann i pull it and run it . Will Work. (I hope that y understand what I want to do).

    • @kanezi
      @kanezi  3 หลายเดือนก่อน +1

      you want postgres and spring boot app in one docker image? It can be done by building an image with all necessary software installed, but it's not a recommended docker way. Docker way are atomic images that you can combine with other services, so one image for database and another for your spring app. You can user docker compose to spin up both containers and run them with one command. I might do a video on the topic to explain it better

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

      yes, it would help me a lot, thank y so much. All the TH-cam videos explains how to create this just locally but now one explain how to push the two images (for Continues integration) to docker hub and after pull them still can connect two each other. As i already said am new with Docker so I hope my Question is not stupid. i Just want to push all these things to docker hub and pull it from other machine and run it@@kanezi

    • @kanezi
      @kanezi  3 หลายเดือนก่อน +1

      @@abidiabdelbaset1920if you want to know how to create and push images to docker hub or other registries for ci, have a look at my github and gitlab ci/cd videos - playlist: th-cam.com/play/PLLhgRnf2WBVQxHnSEGPEh9h5lppcMrNw_.html

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

    Nice tutorial, but could you also demonstrate how to deploy the web application created just in Spring, not SpringBoot..

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

      can you give me more info about what's your use case, so I could recommend you appropriate solution?

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

      @@kanezi I try to deploy Java Spring MVC web app which works fine on my localhost with Tomcat, but when deploy on railway app, it crashes or find nothing when try to use any controller path/address.

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

      if you can share your github repo I can have a look... try to look at railway app logs to see what causes the error

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

      @@kanezi krzysztofskul / sensit5

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

      you can not deploy pure war to railway.app, they don't have servlet container running.
      your options are:
      a) create fat jar with tomcat included, like spring boot creates
      b) create Dockerfile with tomcat as base image and your war installed
      I've done option a in this video!
      I've created pull request on your repo with Dockerfile and instructions on how to do option b

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

    Awesome! Can I follow your tutorial using Eclipse IDE and MySQL as the database manager?

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

      yes, you can use eclipse! railway also supports MySql, so yes, you can use MySql. You'll need to change database url and docker compose database service to use MySql in development as well.