Skip to content

Commit

Permalink
Refactor Dockerfile and cleanup code
Browse files Browse the repository at this point in the history
#deploy-oppdrag-service

Replaced ADD with COPY in Dockerfile and reordered JAVA_OPTS. Added @requiredargsconstructor to OppdragKodeverk enum and removed redundant constructor. Removed @VaultPropertySource from DevConfig for dev profile configuration.
  • Loading branch information
krharum committed Nov 4, 2024
1 parent 08bac2d commit 810bea3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
4 changes: 2 additions & 2 deletions apps/oppdrag-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM ghcr.io/navikt/baseimages/temurin:21
LABEL maintainer="Team Dolly"

ENV JAVA_OPTS="-Dspring.profiles.active=prod --add-opens java.base/java.lang=ALL-UNNAMED"
COPY /build/libs/app.jar /app/app.jar

ADD /build/libs/app.jar /app/app.jar
ENV JAVA_OPTS="--add-opens java.base/java.lang=ALL-UNNAMED -Dspring.profiles.active=prod"

EXPOSE 8080
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
import no.nav.testnav.libs.vault.AbstractLocalVaultConfiguration;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.vault.annotation.VaultPropertySource;

@Configuration
@Profile("dev")
@VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false)
public class DevConfig extends AbstractLocalVaultConfiguration {

}
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package no.nav.testnav.libs.dto.oppdragservice.v1;

import lombok.Getter;
import lombok.RequiredArgsConstructor;

@Getter
@RequiredArgsConstructor
public enum OppdragKodeverk {

JA_NEI (Oppdrag.JaNei.class),
Expand All @@ -16,10 +18,6 @@ public enum OppdragKodeverk {
UTBETALING_FREKVENS_TYPE(Oppdrag.UtbetalingFrekvensType.class),
VALUTA_TYPE(Oppdrag.ValutaType.class);

private Class implementasjon;

private OppdragKodeverk(Class implementasjon) {
this.implementasjon = implementasjon;
}
}
private final Class implementasjon;

}

0 comments on commit 810bea3

Please sign in to comment.