Skip to content

Basic setup

Cezary Kluczyński edited this page Feb 15, 2023 · 18 revisions

STAPI could be run by anyone, using resources found free on the internet. Some technical knowledge is required.

Prequisitions

Database

In the past, STAPI was developed using Oracle DB, but since moved to Postgres 15.1. DB versioning is maintained using XML-based Liquibase migrations, so running with a different database shouldn't be much of an issue, but please open an issue in case of incompabilities.

You will need a copy of one of the tested database engines. When database engine is installed, create new database using a tool of choice, for example, SQL Developer for Oracle, or PG Admin for PostgreSQL.

Important note: when creating database, charset must be set to UTF-8.

Once this is done, configure a datasource, a basic information of what database are you using, and where it is located. Copy sections #Database, #ETL, and #Sources, from server/src/main/resources/application.properties into newly created server/src/main/resources/application-stapi-custom.properties file, in the same directory. By default, Oracle properties are commented out, and PostgreSQL properties are active.

New schema is required, called simply stapi, and an additional schema stapi_users, because of an old migrations that are yet to be cleaned up, but this schema, once created, is not used, and can even be dropped after migrations are ran.

Data

When database is set, data should be loaded to the empty database. This is done automatically when application is first started and migrations are on, which it is by default. Loading data could take a couple of days, but is a one-time process.

Database dumps are available.

Compile and run

To compile everything, run:

./gradlew assemble

To start application, run:

./gradlew bootRun

But you are probably using a IDE that can run Spring Boot application easily.

More

To learn more about the other options, see development.

Clone this wiki locally