-
Notifications
You must be signed in to change notification settings - Fork 3
PDA ENTITY
pace edited this page Nov 5, 2020
·
3 revisions
- Java - 8+
- Git
- Gradle -6.4.1
- Maven 3.1.1(or newer)
Note: Before installing the application, we need to create 2 AWS buckets one private and one public. A step by step process to get a development environment up and running.
Get the application from the git repository.
git clone https://github.com/PDA-Open-Source/PDA-ENTITY.git
cd PDA-ENTITY
Copy the below list of configuration and add it to application.properties file, insert the values with proper configuration details.
server.port=9092
hibernate.dialect=org.hibernate.dialect.MySQLDialect
#aws s3 Configuration
aws-accesskey=""
aws-secretkey=""
aws-s3-bucket-name=""
aws-s3-url=""
#name of the private bucket
aws-s3-bucket-name-private=""
#url of the private bucket
aws-s3-url-private=""
aws-region=""
aws-qrcode=qr-code/
#Encryption Values
salt-value= #In case to change the value refer PDA-WEB wiki
iv-value= #In case to change the value refer PDA-WEB wiki
secret-key= #In case to change the value refer PDA-WEB wiki
key-size=128
iteration-count=1000
#Database Configuration
spring.jpa.database=POSTGRESQL
spring.datasource.platform=postgres
spring.datasource.url=jdbc:postgresql://localhost:5432/pda_entity
spring.datasource.username=postgres
spring.datasource.password=password
spring.jpa.show-sql=true
spring.jpa.generate-ddl=true
spring.jpa.hibernate.ddl-auto=create (use update when any changes to the model)
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
#Application Base url
iam-baseurl=http://localhost:9090/api/v2/user/
spring.servlet.multipart.enabled=true
# Threshold after which files are written to disk.
spring.servlet.multipart.file-size-threshold=2KB
# Max file size.
spring.servlet.multipart.max-file-size=500MB
# Max Request Size
spring.servlet.multipart.max-request-size=550MB
spring.main.allow-bean-definition-overriding=true
#Log Module
log.location=
org.springframework.boot.logging.LoggingSystem=none
management.endpoints.web.exposure.include=prometheus
org.springframework.boot.logging.LoggingSystem=none
file-folder-path=PDA-ENTITY/src/main/resources/templates/
member-attestation-template-path=PDA-ENTITY/src/main/resources/templates/MemberAttestation.html
trainee-attestation-template-path=PDA-ENTITY/src/main/resources/templates/TraineeAttestation.html
profile-front-template-path=PDA-ENTITY/src/main/resources/templates/ProfileFrontTemplate.html
registry-base-url=http://localhost:8090/ #Registry base URL
keycloak.principal-attribute=preferred_username
keycloak.auth-server-url=http://localhost:8080/auth/ #Keycloak URL
keycloak.realm=master
keycloak-client-id=admin-cli
keycloak.credentials.secret= #keycloak client secret key
keycloak-public-key= #keycloak realm Public key
client.granttype=password # Keycloak Grant Type
admin-user-username=admin # Keycloak login username
admin-user-password=admin # Keycloak login password
keycloak.resource=account
keycloak.bearer-only = true
After adding the necessary configuration now let us run the service.
docker build -t <servicename>:<versionname> . #update version in docker-compose file
docker compose up -d
gradle clean build -x test
java -jar build/libs/<name of the jar file>
Now we can check the application on the localhost and the port 9092 defined in the application.properties file can even access Swagger API document at http://localhost:9092/swagger-ui.html and the necessary database tables are created once the application is up and running.
wiki
Architecture
Configuration