r/SpringBoot • • Aug 03 '24

Deploying of a spring boot &angular app

Hi I created a spring boot & angular application with mysql as a database and i want to learn how to deploy it. Is there any videos or articles I can follow because honestly i do not have any idea where to start from

24 Upvotes

14 comments sorted by

View all comments

7

u/bikeram Aug 03 '24

There's a few ways to do this.

My current method is using maven's frontend-maven-plugin. Maven compiles my Vue code, then copies it into my springboot target. This means my springboot.jar has everything. Then I can build a single docker container to deploy.

The other way to do this would be build a nginx container with all of your static angular code. Then reverse proxy to your springboot container.

On second thought, I'll throw together a repo. This can get pretty involved.

1

u/g00glen00b Aug 03 '24

I usually do something similar, but turn the frontend into its own Maven module and include it as a Maven dependency. https://dimitri.codes/bundling-react-spring-boot/