This module installs a local Payara server, deploys the previously built SORMAS artifacts and starts the server.
The server installation is located in the project build directory (target/cargo), as well as the SORMAS server
directories (target/sormasfolders).
This setup requires a working Java, maven, and docker(-compose) environment.
The configuration of the docker setup and the payara domain setup are defined by the generated file .env. It
configures port and server of the sormas-postgres docker container or another postgres database, as well as other
ports defined in the domain.xml.
Properties used in the payara deployment are configured in the generated file target/sormas.properties.
Both .env and sormas.properties can be customized by adding a file custom.env respectively custom.properties
in the project base directory, where additional properties for the respective purpose are defined. Already defined
properties are overwritten. Both custom.env and custom.properties are excluded in .gitignore, so local
customizations are protected from accidental commits.
To run the cargo server against an existing database, configure
SORMAS_POSTGRES_SERVER=<database-server>
SORMAS_POSTGRES_PORT=<database-port>in file custom.env and skip the docker-compose step in the server setup (see file custom.env.example).
To add properties to the generated sormas.properties, configure e.g.
custombranding=true
custombranding.name=<name>
custombranding.logo.path=<logopath>in file custom.properties (see file custom.properties.example).
After adjusting the configurations, (re)run mvn install and (re)start the server.
The most convenient way to build and deploy the SORMAS artifacts to cargo is to use build_deploy.sh.
Build all SORMAS artifacts:
cd sormas-base && mvn installcd sormas-cargoserver && docker-compose up -dcd sormas-cargoserver && mvn cargo:runOnce the deployment is completed, you can navigate to http://localhost:6080/sormas-ui and login as admin with
password sadmin.
cd sormas-cargoserver && mvn cargo:stopcd sormas-cargoserver && docker-compose downThe SORMAS-PostgreSQL docker container uses a named docker volume:
$ docker volume ls
DRIVER VOLUME NAME
local sormas-cargoserver_psqldata_cargoserverTo remove this docker volume:
sudo docker volume rm sormas-cargoserver_psqldata_cargoserver