$ mvn clean install
Project uses FlyWay DB for database schema versioning, and JOOQ framework for accessing database. After each impact on database schema, JOOQ supplementary classes regeneration must be launched. Regeneration procedure assumes that:
- There is a Postgresql database instance, available at JDBC_URL:
jdbc:postgresql://127.0.0.1:5432/postgres?user=postgres&password=postgres
To launch JOOQ sources regeneration:
$ mvn clean install -Pjooq-regenerate
Project uses integration testing, based on Testcontainers and Webdriver. Integration tests expect that:
- Chrome browser is installed on host
- Chrome webdriver of the version, compatible with installed Chrome browser, is installed and available in PATH
- Docker is installed on host and is online (see Testcontainers prerequisites)
Integration tests are supported only on Linux-based hosts. You can skip them by using either of two commands below:
$ mvn clean install -DskipTests
- Prerequisites: Oracle/Openjdk Java 8 or greater. Postgresql 10.
- Prepare postgres, GitHub OAuth integration and set up mandatory environment variables.
mvn dependency:get -DgroupId=com.github.skapral.poetryclub -DartifactId=poetryclub-app -Dversion=<version number>
java -jar poetryclub-app-*.jar
Note that Poetry Club supports also deployment to Dokku and Heroku.
Name | Description |
---|---|
PORT | Optional. Integer. Port number, to which the service is bound. Default is 5000. |
OWNER | Mandatory. Github login name for the user, owning the service instance. When logged in first time, this user will be prompted to craete a community. |
JDBC_DATABASE_URL | Mandatory. JDBC URL to the Postgresql database instance. |
GITHUB_API_KEY | Mandatory. Github OAuth application's API key. |
GITHUB_API_SECRET | Mandatory. Github OAuth application's API secret. |
TEST_ENV | Optional. If set, the instance will be deployed with stubbed authentication. Convenient for testing. |
DOCKER_HOST | Optional. Default is http://localhost:2375 . Docker host, used by Testcontainers during integration tests execution |