Installation - petafuel/styx GitHub Wiki
Styx is build using the Amazon Corretto 8 - the production-ready distribution of Open Java Development Kit (OpenJDK) and uses a PostgreSQL database.
-
📁 Clone the repository
git clone https://github.com/petafuel/styx.git
-
📦 Styx uses packages provided through GitHub Packages
Edit your ~/.2/settings.xml and add your GitHub username and your personal access token. Also see here.<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> <servers> <server> <id>styxgithub</id> <username>GITHUB_NAME</username> <password>GITHUB_TOKEN</password> </server> </servers> </settings>
-
🛠️ Configure Styx
You have to adjust connectionpool.properties in the Styx root directory to configure the connection to your PostgreSQL database.
Replace$DATABASE_NAME
with a name for your database setup, e.g.styx_prod
:
db.jdbcurl.styx_prod=jdbc:postgresql://<host>:<port>/<database>
db.user.styx_prod=<user>
db.password.styx_prod=<password>
Copy core/src/main/resource/example.core.properties to core/src/main/resource/example.core.properties and adjust core/src/main/resource/core.properties and api/src/main/resources/api.properties according to your Styx deployment. -
🗄️ Populate the database
The SQL files to setup the Styx database are located in the sql folder.
Load all files sequentially sorted by their name in ascending order.
psql styx_database_name < <xxx>.sql
or
psql -d <styx_database_name> -h localhost -U <mypguser> < <xxx>.sql
-
🔨 Build Styx
Run the Maven commandmvn clean -DskipTests=true install
to build Styx. -
🤸 Execute Styx
cd api/target java -jar styxRest.jar