-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: better usage of java memory runtime & bump minor versions (#311)
* feat: log available memory at startup * build: bump version to 4.7.6-SNAPSHOT.1 * fix: liquibase (DO NOT change existing changeset) * fix: logging properties at startup * chore: log cpu avalaible * build: add JAVA_TOOL_OPTIONS var * build: bump version to 4.7.6-SNAPSHOT.2 * build: can overload JAVA_TOOLS_OPTIONS (while keeping default value) * build: bump version to 4.7.6-SNAPSHOT.3 * build: fix JVM TOOLS * build: upgrade base image * chore: liquibase failOnError="false" * bump version to 4.7.6-SNAPSHOT.5 * chore: restore old liquibase * bump: minor version * build: bump version to 4.7.6
- Loading branch information
1 parent
52086bf
commit 12fddf8
Showing
4 changed files
with
69 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,14 @@ | ||
FROM eclipse-temurin:21.0.3_9-jre | ||
FROM eclipse-temurin:21.0.4_7-jre | ||
|
||
ENV PATH_TO_JAR=/application/pogues-bo.jar | ||
WORKDIR application | ||
RUN rm -rf /application | ||
ADD ./target/pogues-bo.jar /application/pogues-bo.jar | ||
ENTRYPOINT ["java", "-jar", "/application/pogues-bo.jar"] | ||
ADD ./target/pogues-bo.jar $PATH_TO_JAR | ||
|
||
ENV JAVA_TOOL_OPTIONS_DEFAULT \ | ||
-XX:MaxRAMPercentage=75 \ | ||
-XX:+UseParallelGC | ||
|
||
ENTRYPOINT [ "/bin/sh", "-c", \ | ||
"export JAVA_TOOL_OPTIONS=\"$JAVA_TOOL_OPTIONS_DEFAULT $JAVA_TOOL_OPTIONS\"; \ | ||
exec java -jar $PATH_TO_JAR" ] |
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 |
---|---|---|
@@ -1,23 +1,33 @@ | ||
package fr.insee.pogues; | ||
|
||
import fr.insee.pogues.configuration.PropertiesLogger; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
import org.springframework.boot.builder.SpringApplicationBuilder; | ||
import org.springframework.boot.context.event.ApplicationReadyEvent; | ||
import org.springframework.boot.context.properties.ConfigurationPropertiesScan; | ||
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; | ||
import org.springframework.context.event.EventListener; | ||
import org.springframework.transaction.annotation.EnableTransactionManagement; | ||
|
||
@SpringBootApplication(scanBasePackages = "fr.insee.pogues") | ||
@EnableTransactionManagement | ||
@ConfigurationPropertiesScan | ||
@Slf4j | ||
public class Pogues extends SpringBootServletInitializer { | ||
|
||
@Override | ||
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { | ||
return application.sources(Pogues.class); | ||
public static SpringApplicationBuilder configureApplicationBuilder(SpringApplicationBuilder springApplicationBuilder){ | ||
return springApplicationBuilder.sources(Pogues.class).listeners(new PropertiesLogger()); | ||
} | ||
|
||
public static void main(String[] args) { | ||
SpringApplication.run(Pogues.class, args); | ||
configureApplicationBuilder(new SpringApplicationBuilder()).build().run(args); | ||
} | ||
|
||
@EventListener | ||
public void handleApplicationReady(ApplicationReadyEvent event) { | ||
log.info("=============== Pogues Back-Office has successfully started. ==============="); | ||
} | ||
} |
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