-
Notifications
You must be signed in to change notification settings - Fork 0
How to run application without IDE or gradle how to configure apache
In order to run the application, first, you need to run following command in the project root folder (where build.gradle is located):
gradle bootRepackage
This command will build project and produce geocollections.war file to build/libs folder.
geocollections.war can be run using following command:
java -jar geocollections.war
You can choose different profiles (environments) with --spring.profiles.active= key:
java -jar geocollections.war --spring.profiles.active=jenkins
- if you want to run application with jenkins
profile.
java -jar geocollections.war --spring.profiles.active=prod
- for prod
profile
Default server port is 8082.
More detailed profile description is available here: Environment profiles
java -jar geocollections.war --spring.profiles.active=prod > /path/to/logs.log
Since our application is another HTTP server (Tomcat), you will need to configure Apache to forward requests to it (first, you need to run it). Please refer to /etc/apache2/sites-available/geocollections.conf file.
By the way, we needed to replace in all configuration files in /etc/apache2/sites-available in the very first l ine <VirtualHost * star with domain name eg geocollections.arendus.geokogud.info to ensure that requests are properly forwarded.
For configuration changes to take effect, you need to restart Apache:
sudo service apache2 restart