Skip to content

Commit f15ab4d

Browse files
authored
Slår på remote debugging i dev. (#2003)
1 parent da826cb commit f15ab4d

File tree

5 files changed

+23
-12
lines changed

5 files changed

+23
-12
lines changed

.deploy/dev-fss-teamforeldrepenger.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,5 @@ spec:
9797

9898
- name: SKAL_INNENTE_YTELSE_ANVIST_ANDELER
9999
value: "true"
100+
- name: APPD_ENABLED
101+
value: "false"

.deploy/prod-fss-teamforeldrepenger.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,5 @@ spec:
9696

9797
- name: SKAL_INNENTE_YTELSE_ANVIST_ANDELER
9898
value: "true"
99+
- name: APPD_ENABLED
100+
value: "true"
File renamed without changes.

.scripts/08-remote-debug.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
3+
# Enables remote debugging on port 5005 if the application is running in a development cluster
4+
5+
if [ "$NAIS_CLUSTER_NAME" = "dev-fss" ] || [ "$NAIS_CLUSTER_NAME" = "dev-gcp" ]; then
6+
export JAVA_OPTS="${JAVA_OPTS} -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005"
7+
fi

Dockerfile

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
FROM navikt/java:17-appdynamics
1+
FROM navikt/temurin:17-appdynamics
22

33
LABEL org.opencontainers.image.source=https://github.com/navikt/fp-abakus
4-
ENV APPD_ENABLED=true
4+
ENV TZ=Europe/Oslo
55

66
RUN mkdir lib
7-
RUN mkdir webapp
87
RUN mkdir conf
98

10-
# Config
11-
COPY web/target/classes/logback*.xml conf/
12-
13-
# Application Container (Jetty)
14-
COPY web/target/app.jar .
15-
COPY web/target/lib/*.jar ./
16-
179
ENV JAVA_OPTS="-XX:MaxRAMPercentage=75.0 \
1810
-Djava.security.egd=file:/dev/urandom \
1911
-Duser.timezone=Europe/Oslo \
2012
-Dlogback.configurationFile=conf/logback.xml"
2113

2214
# Export vault properties
23-
COPY .scripts/03-import-appdynamics.sh /init-scripts/03-import-appdynamics.sh
24-
COPY .scripts/05-import-users.sh /init-scripts/05-import-users.sh
15+
COPY --chown=apprunner:root .scripts/03-import-appd.sh /init-scripts/03-import-appd.sh
16+
COPY --chown=apprunner:root .scripts/05-import-users.sh /init-scripts/05-import-users.sh
17+
COPY --chown=apprunner:root .scripts/08-remote-debug.sh /init-scripts/08-remote-debug.sh
18+
19+
# Config
20+
COPY web/target/classes/logback*.xml conf/
21+
22+
# Application Container (Jetty)
23+
COPY web/target/app.jar .
24+
COPY web/target/lib/*.jar ./

0 commit comments

Comments
 (0)