How can I run the application on port 80 on Ubuntu Server 14.04?
Didn't work.. I'm launching it as described in https://github.com/dularion/streama/wiki/Setup-Streama-on-Ubuntu-14.04
/tomcat-root/conf/server.xml
Connector port 8080 藘 80.
I was also struggling with this while deploying the app with ansible and I'm not a Java or spring developer but in the spring.io docs it says that you should be using application.properties files to set these settings.
That way, according to docs you can deploy application.properties file into tomcat webapps dir (along side war) and override settings like grails.server.port.http or even datasource.
This is much smarter for deployment than editing the DataSource.groovy files in a git repo. When I do deployment of git apps with ansible I like to keep the git repo clean so I can update it next deployment.
But I've been unable to make the application.properties method described by spring.io to work.
Either I'm missing something fundamental for Java devs or the groovy files require variable values in order to be overridden by application.properties. I'm out of my depth but I can clearly see that this app needs some better deployment.
If we are talking about the v1.x then you need to use application.yml alongside the war file. See instructions here https://github.com/dularion/streama/wiki/BETA---Grails-3
You can try this setting:
environments:
production:
server:
port: 80
Thank you dularion!
This helps a lot!
I have now:
environments:
production:
dataSource:
driverClassName: 'com.mysql.jdbc.Driver'
url: jdbc:mysql://localhost/streama
username: streama
password: streama
server:
port: 87
Is this correct?
should be!
except: ymls are sensitive to tabs, so mind that you use the right format
Thanks a lot. It messed up my formatting while pasteing...
Most helpful comment
If we are talking about the v1.x then you need to use application.yml alongside the war file. See instructions here https://github.com/dularion/streama/wiki/BETA---Grails-3
You can try this setting: