-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(backend): allow setting JVM options by using entrypoint.sh in do…
…ckerfile, free memory (#1901) - Use an entrypoint.sh file for backend to allow passing JVM options - Pass `-XX:+UseContainerSupport -XX:+UseG1GC -XX:MaxHeapFreeRatio=5 -XX:MinHeapFreeRatio=2` to free memory, this allows us to set the memory limit fairly high without Java taking up a lot of memory - Increase memory limit of: a) silo preprocessing (it can spike up to 3GB for full mpox), b) nextclade preprocessing (it can also go beyond 1GB), c) backend (it can go above 1GB with full mpox)
- Loading branch information
1 parent
c348613
commit 7ccbfd3
Showing
5 changed files
with
21 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh | ||
JVM_OPTS=${JVM_OPTS:-} | ||
# Take script arguments | ||
ARGS="${*}" | ||
|
||
if [ -n "$JVM_OPTS" ]; then | ||
CMD="java $JVM_OPTS -jar app.jar --spring.profiles.active=docker $ARGS" | ||
else | ||
CMD="java -jar app.jar --spring.profiles.active=docker $ARGS" | ||
fi | ||
echo Running: | ||
echo "$CMD" | ||
$CMD |
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