This project uses Quarkus, the Supersonic Subatomic Java Framework.
If you want to learn more about Quarkus, please visit its website: https://quarkus.io/ .
You can run your application in dev mode that enables live coding using:
mvn quarkus:dev
Another option is to run the app directly from your IDE. This can be done by opening
the StudioApiQuarkusMain
class in your idea and running (or debugging) it as a
java application.
By default, mvn clean install
produces an executable JAR with the dev Quarkus configuration profile enabled, and in-memory persistence implementation.
The application can be packaged using mvn package
.
It produces the apicurio-studio-api-runner.jar
file in the /target
directory.
Be aware that it’s not an über-jar as the dependencies are copied into the target/lib
directory.
The application is now runnable using java -jar target/apicurio-studio-api-runner.jar
.
-Pprod
enables Quarkus's prod configuration profile, which uses configuration options suitable for a production environment, e.g. a higher logging level.
- In the dev mode, the application uses an in-memory H2 database`.
- In the prod mode, you have to provide connection configuration for a database server as follows:
Option | Command argument | Env. variable | Default |
---|---|---|---|
DS Driver | -Dquarkus.datasource.jdbc.db-kind |
----------------- |
postgresql |
Data Source URL | -Dquarkus.datasource.jdbc.url |
APICURIO_DB_CONNECTION_URL |
---- |
DS Username | -Dquarkus.datasource.username |
APICURIO_DB_USER_NAME |
---- |
DS Password | -Dquarkus.datasource.password |
APICURIO_DB_PASSWORD |
---- |
Note that since in quarkus the database driver propery db-kind
is a build time property, once you have compiled the project you won't be able to change it for example at docker-compose level.
To see additional options, visit:
For both profiles you need to provide connection configuration for a oidc server as follows:
Option | Command argument | Env. variable |
---|---|---|
OIDC Server | -Dstudio.keycloak.url |
APICURIO_KC_AUTH_URL |
OIDC Realm | -Dstudio.keycloak.realm |
APICURIO_KC_REALM |
OIDC Client ID | -Dquarkus.oidc.client-id |
APICURIO_KC_CLIENT_ID |
To see additional options, visit:
Note that in order to have the full apicurio-studio
app running both the api
and the ws
needs to share the same database.