Answer the question
In order to leave comments, you need to log in
How to correctly deploy a Spring Boot application to a production server?
Good day!
There are several questions that I would like to hear answered. I would like to know the opinion of professionals who have been working with Spring (Spring Boot) for several days.
1) Which deployment method is preferable for production?
Deploy with built-in tomcat and launch jar file.
It is assumed that:
a jar is opened,
a service is created in init.d, ln -s /var/example/example.jar /etc/init.d/example
the project is launched via service example start
Deploy to an external tomcat and the launch of the war file (or war exploded)
(I don’t consider deployment options on Heroku, Google Cloud, etc. yet)
2) How to correctly enable SSL for a Spring Boot application? I have Vesta CP installed on my hosting (vps) and LE certificate is configured for the domain. Application added with self-contained tomcat works without ssl. An error is thrown when accessing SSL.
3) The hosting is configured with apache (not tomcat) + nginx. What exactly needs to be updated in the nginx configuration for the domain so that the site is available at example.com, and not example.com:8080
4) When deploying the application to an external tomcat, where exactly should the site files (war exploded) be located? In the installation location of tomcat /opt/tomcat/webapps/ or where is the public directory of the domain itself? As far as I understand, in order for it to be available in the public directory, it needs to be configured tomcat.
Thanks in advance for your replies!
Answer the question
In order to leave comments, you need to log in
Tomkat as a service. Nginx as a proxy.
https://clouding.io/kb/en-us/articles/360010691359...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question