8000 GitHub - aMytho/hex · GitHub
[go: up one dir, main page]

Skip to content
aMythoPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

Hex

An open-source live streaming site.

Release CircleCI

Development Setup

To get a development environment setup for this project, follow these steps:

Prerequisites

Initial setup

  • 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

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0