|
|
||
|---|---|---|
| .mvn/wrapper | ||
| .sonarlint | ||
| runConfigurations | ||
| wp2-be-audit-dm-client | ||
| wp2-be-audit-dm-server | ||
| .gitattributes | ||
| .gitignore | ||
| CHANGELOG.md | ||
| Dockerfile | ||
| README.md | ||
| lombok.config | ||
| mvnw | ||
| mvnw.cmd | ||
| pom.xml | ||
README.md
Audit Domain Service
Audit Domain Service is a Spring Boot application built with Maven, providing CRUD operations for managing audit related information.
Features
- Audit
- Create
- Read
- Find All
Getting Started
Using remote PostgreSQL Server
You can update the following datasource properties to point it to a remote PostgreSQL server in application-local.yaml
audit_dm_datasource_url:
audit_dm_datasource_user:
audit_dm_datasource_password:
Using PostgreSQL server running in docker
In order to run the PostgreSQL in local docker environment, you can use the following docker-compose.yml snippet.
Please make sure to create the directory named pg_data in your user.home directory as it uses it for mounting volume. Otherwise, update the volumes section to point to an existing empty directory.
name: itserr
networks:
net:
services:
postgres:
image: postgres:16
container_name: postgres
restart: always
# set shared memory limit when using docker-compose
shm_size: 128mb
environment:
POSTGRES_DB: itserr_db
POSTGRES_USER: itserr_user
POSTGRES_PASSWORD: itserr_pwd
volumes:
- ~/pg_data:/var/lib/postgresql/data
ports:
- "5432:5432"
networks:
net:
aliases:
- postgres
You can then use the following commands to start up the docker containers
# replace <docker_compose_file_name> with the actual docker compose file name
docker compose -f <docker_compose_file_name> up -d
Requirements
For building and running the application you need:
- GIT 2.48.1 +
- JDK 21 +
- PostgreSQL 16
Clone the repository
git clone https://code-repo.d4science.org/Resilience/wp2-be-audit-dm.git
cd wp2-be-audit-dm
Build the project
./mvnw clean install
Run the application
java -jar wp2-be-audit-dm-server/target/<jar-file>
Access the API
- Base URL:
http://localhost:8080/api/v1/dm - Swagger UI URL:
http://localhost:8080/api/v1/dm/swagger-ui/index.html
Development
Please review this wiki page and follow the guidelines mentioned - Code Management Workflow and Standards