pg integration

This commit is contained in:
Timo Bejan 2021-09-16 11:34:11 +03:00
parent 48959e1e3b
commit 7211c02d16
11 changed files with 42 additions and 26 deletions

View File

@ -1,6 +1,18 @@
version: '2'
services:
db:
image: postgres
restart: always
ports:
- 5432:5432
environment:
POSTGRES_USER: redaction
POSTGRES_PASSWORD: redaction
POSTGRES_DB: redaction
rabbitmq:
image: 'bitnami/rabbitmq:latest'
mem_limit: 1000m

View File

@ -31,7 +31,7 @@ public class Comment {
private OffsetDateTime date;
@Column
private String text;
@Column
@Column(name = "user_id")
private String user;
@Column

View File

@ -19,7 +19,7 @@ public class IdRemoval {
@EmbeddedId
private AnnotationId id;
@Column
@Column(name = "user_id")
private String user;
@Column
private AnnotationStatus status;

View File

@ -19,7 +19,7 @@ public class ManualForceRedaction {
@EmbeddedId
private AnnotationId id;
@Column
@Column(name = "user_id")
private String user;
@Column
private AnnotationStatus status;

View File

@ -19,7 +19,7 @@ public class ManualImageRecategorization {
@EmbeddedId
private AnnotationId id;
@Column
@Column(name = "user_id")
private String user;
@Column
private AnnotationStatus status;

View File

@ -20,7 +20,7 @@ public class ManualLegalBasisChange {
@EmbeddedId
private AnnotationId id;
@Column
@Column(name = "user_id")
private String user;
@Column
private AnnotationStatus status;

View File

@ -15,7 +15,7 @@ public class ManualRedactionEntry {
@EmbeddedId
private AnnotationId id;
@Column
@Column(name = "user_id")
private String user;
@Column
private String typeId;

View File

@ -33,7 +33,7 @@ public class ViewedPage {
private String fileId;
@Column
private int page;
@Column
@Column(name = "user_id")
private String userId;
}

View File

@ -21,6 +21,6 @@ public class RuleSet {
private long version;
@Lob
@Column(name = "value", columnDefinition="CLOB")
@Column(name = "value", columnDefinition="TEXT")
private String value;
}

View File

@ -41,7 +41,7 @@ public class SMTPConfiguration {
// if AUTH is true, following must also be set
@Column
private boolean auth;
@Column
@Column(name="username")
private String user;
@Column
private String password;

View File

@ -5,11 +5,27 @@ redaction-service.url: "http://redaction-service-v1:8080"
configuration-service.url: "http://configuration-service-v1:8080"
pdftron-redaction-service.url: "http://pdftron-redaction-service-v1:8080"
redaction-report-service.url: "http://redaction-report-service-v1:8080"
search-service.url: "http://search-service-v1:8080"
server:
port: 8080
spring:
datasource:
url: jdbc:postgresql://${PSQL_HOST}:${PSQL_PORT}/${PSQL_DATABASE}
jdbcUrl: jdbc:postgresql://${PSQL_HOST}:${PSQL_PORT}/${PSQL_DATABASE}
driverClassName: org.postgresql.Driver
username: ${PSQL_USERNAME}
password: ${PSQL_PASSWORD}
platform: org.hibernate.dialect.PostgreSQL95Dialect
jpa:
database-platform: org.hibernate.dialect.PostgreSQL95Dialect
hibernate:
ddl-auto: update
naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy
generate-ddl: true
profiles:
active: kubernetes
rabbitmq:
@ -43,21 +59,9 @@ cassandra:
storage:
signer-type: 'AWSS3V4SignerType'
# region: 'us-east-1'
# endpoint: 'https://s3.amazonaws.com'
bucket-name: 'redaction'
region: 'us-east-1'
endpoint: 'https://s3.amazonaws.com'
spring:
datasource:
jdbcUrl: "jdbc:postgresql://${PSQL_HOST}:${PSQL_PORT}/${PSQL_DATABASE}"
driverClassName: org.postgresql.Driver
username: ${PSQL_USERNAME}
password: ${PSQL_PASSWORD}
platform: org.hibernate.dialect.PostgreSQL95Dialect
jpa:
database-platform: org.hibernate.dialect.PostgreSQL95Dialect
hibernate:
ddl-auto: update
naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy
generate-ddl: true
endpoint: 'http://localhost:9000'
key: minioadmin
secret: minioadmin