Skip to content

Commit

Permalink
Update Docker services and refine configs #deploy-organisasjon-forvalter
Browse files Browse the repository at this point in the history
Renamed and added new PostgreSQL services in compose.yaml for better isolation. Removed redundant filtering in OrdreStatusService, switched SecurityConfig profile from "dev" to "local", and adjusted database settings in application-local.yml.
  • Loading branch information
krharum committed Sep 13, 2024
1 parent 22467c1 commit 92d45d5
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
@Order(1)
@EnableWebSecurity
@Configuration
@Profile({"prod", "dev"})
@Profile({"prod", "local"})
public class SecurityConfig {

@Bean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ public OrdreResponse getStatus(List<String> orgnumre) {
.filter(orgnr -> statusMap.stream()
.noneMatch(status -> orgnr.equals(status.getOrganisasjonsnummer())))
.filter(orgnr -> orgImiljo.stream()
.filter(iMiljoe -> !iMiljoe.isEmpty())
.flatMap(iMiljoe -> iMiljoe.values().stream())
.noneMatch(iMiljo -> orgnr.equals(iMiljo.getOrganisasjonsnummer())))
.collect(Collectors.toSet());
Expand Down Expand Up @@ -98,7 +97,6 @@ public OrdreResponse getStatus(List<String> orgnumre) {
.toList());

orgStatus.addAll(orgImiljo.stream()
.filter(iMiljo -> !iMiljo.isEmpty())
.map(iMiljo -> iMiljo.entrySet().stream()
.map(entry -> BestillingStatus.builder()
.orgnummer(entry.getValue().getOrganisasjonsnummer())
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@

spring:
datasource:
url: jdbc:postgresql://localhost:5432/organisasjon-forvalter-test
hikari:
maximum-pool-size: 3
minimum-idle: 1
url: jdbc:postgresql://localhost:5434/postgres
driver-class-name: org.postgresql.Driver
jpa:
properties:
hibernate:
format_sql: true
default-schema: public
show-sql: false
database-platform: org.hibernate.dialect.PostgreSQLDialect
username: postgres
cloud:
vault:
host: vault.adeo.no
Expand Down
26 changes: 23 additions & 3 deletions docs/compose.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,30 @@
services:
postgres:
container_name: postgres
postgres-dolly:
container_name: dolly-test
image: postgres:latest
environment:
- POSTGRES_DB=postgres
- POSTGRES_DB=dolly-test
- POSTGRES_HOST_AUTH_METHOD=trust
ports:
- "5432:5432"
restart: always

postgres-pdl-forvalter:
container_name: pdl-forvalter-test
image: postgres:latest
environment:
- POSTGRES_DB=pdl-forvalter-test
- POSTGRES_HOST_AUTH_METHOD=trust
ports:
- "5433:5432"
restart: always

postgres-org-forvalter:
container_name: organisasjon-forvalter-test
image: postgres:latest
environment:
- POSTGRES_DB=organisasjon-forvalter-test
- POSTGRES_HOST_AUTH_METHOD=trust
ports:
- "5434:5432"
restart: always

0 comments on commit 92d45d5

Please sign in to comment.