-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DOKY-204 Update deployment for email-service (#133)
Set up non-web `email-service` and enhance observability Configured `email-service` to run as a non-web application by disabling the web application type. Added a dedicated `Dockerfile` for `email-service` with Datadog integration and introduced a production-specific JSON logging configuration. Adjusted environment configurations to improve flexibility and maintain consistency across services.
- Loading branch information
1 parent
8f67366
commit 36837f8
Showing
8 changed files
with
130 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<configuration> | ||
<springProfile name="!prod"> | ||
<include resource="org/springframework/boot/logging/logback/defaults.xml"/> | ||
<include resource="org/springframework/boot/logging/logback/console-appender.xml"/> | ||
<root level="info"> | ||
<appender-ref ref="CONSOLE"/> | ||
</root> | ||
</springProfile> | ||
<springProfile name="prod"> | ||
<appender name="stdout" class="ch.qos.logback.core.ConsoleAppender"> | ||
<encoder class="net.logstash.logback.encoder.LoggingEventCompositeJsonEncoder"> | ||
<providers> | ||
<timestamp> | ||
<timeZone>UTC</timeZone> | ||
</timestamp> | ||
<loggerName/> | ||
<logLevel> | ||
<fieldName>status</fieldName> | ||
</logLevel> | ||
<threadName/> | ||
<stackTrace/> | ||
<message/> | ||
<nestedField> | ||
<fieldName>mdc</fieldName> | ||
<providers> | ||
<mdc/> | ||
</providers> | ||
</nestedField> | ||
<throwableClassName/> | ||
</providers> | ||
</encoder> | ||
</appender> | ||
<root level="info"> | ||
<appender-ref ref="stdout"/> | ||
</root> | ||
</springProfile> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
FROM openjdk:17 | ||
|
||
COPY --from=datadog/serverless-init:1 /datadog-init /app/datadog-init | ||
ADD 'https://dtdg.co/latest-java-tracer' /dd_tracer/java/dd-java-agent.jar | ||
|
||
ARG DD_VERSION=Aardvark-v0.1 | ||
ARG DD_SERVICE=email-service | ||
ARG DD_ENV=prod | ||
|
||
ENV DD_SERVICE=$DD_SERVICE | ||
ENV DD_ENV=$DD_ENV | ||
ENV DD_VERSION=$DD_VERSION | ||
|
||
LABEL com.datadoghq.tags.service=$DD_SERVICE | ||
LABEL com.datadoghq.tags.env=$DD_ENV | ||
LABEL com.datadoghq.tags.version=$DD_VERSION | ||
|
||
ENV DD_TRACE_SQL_ENABLED=true | ||
ENV DD_DATABASE_MONITORING=true | ||
ENV DD_MSSQL_ENABLED=true | ||
|
||
ENV DD_LOGS_ENABLED=true | ||
ENV DD_IAST_ENABLED=true | ||
ENV DD_APPSEC_ENABLED=true | ||
ENV DD_PROFILING_ENABLED=true | ||
ENV DD_TRACE_ENABLED=true | ||
ENV DD_LOGS_INJECTION=true | ||
ENV DD_TRACE_SAMPLE_RATE=1 | ||
|
||
ARG JAR_FILE=email-service/build/libs/email-service.jar | ||
COPY ${JAR_FILE} app.jar | ||
|
||
CMD ["/app/datadog-init", "java", "-jar", "-Dspring.profiles.active=$DD_ENV", "/app.jar"] |