An open-source live streaming site.
To get a development environment setup for this project, follow these steps:
- Java OpenJDK 19
- Apache Tomcat 10.1
- Apache Maven 3.9
- Docker or a local installation of Postgresql 15.3
- (Optional) My greenmail-gui project for locally testing/viewing emails generated by the application
- Make a copy of the "prod.properties" file under the root of the project and name it "secretkeys.properties" then specify actual values for the keys. This file is automatically picked up by the maven build if it exists and will be used by the application (it is also in the .gitignore file so no need to worry about accidently committing it). Some common "secretkeys.properties" values if you are using the default setup:
(This is just some of the settings not all of them, please make sure to copy all the settings from prod.properties and fill them in)
dbport=5432
dbserver=localhost
dburl=jdbc:postgresql://${dbserver}:${dbport}/${dbname}
emailHost=localhost
emailPort=10025
emailTLS=true
emailFrom=hexautomatedemail@memoryleakdeath.tv
dbtestport=5432
dbtestserver=localhost
dbtesturl=jdbc:postgresql://${dbtestserver}:${dbtestport}/${dbtestname}
(note the email settings here assume you are using the greenmail-gui project as a testbed, there should not be a hard dependency on that so you can use real settings here if you wish)
- To initialize and start the database via docker (requires docker installation), run the following command:
mvn clean resources:resources docker:build docker:start
(you should be able to start/stop/restart the container from the command-line or docker desktop after this is run)
- To run the database migration scripts and generate a SSL keystore, run the following command:
mvn resources:resources liquibase:update verify
- Configure tomcat's server.xml to connect via SSL on port 8443 with the following configuration (replace "<project.directory>" with the path to the project files downloaded from github):
<Connector connectionTimeout="20000" maxParameterCount="1000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>
<Connector SSLEnabled="true" maxParameterCount="1000" maxThreads="150" port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol">
<UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol"/>
<SSLHostConfig>
<Certificate certificateKeystoreFile="<project.directory>/conf/local_keystore.jks" certificateKeystorePassword="changeit" type="RSA"/>
</SSLHostConfig>
</Connector>
- NOTE on Eclipse IDE: I recommend changing the tomcat settings (double-click the server in the "servers" view) to have longer timeouts on start/stop and also click the "modules" tab and make sure the application root is set to just "/".
- (Optional) Configure your IDE to use the Checkstyle file in the root of the project (checkstyle.xml). The checkstyle checks can also be run via maven:
mvn checkstyle:check
- That's it! You should be able to see the application running at "https://localhost:8443/" and if you optionally deploy greenmail-gui for email testing, that will be at "https://localhost:8443/greenmail-gui/".