Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes logger, docker and systemd servicefile related issues #24

Merged
merged 2 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ COPY rpm/target/rpm/com.teragrep-lsh_01/RPMS/noarch/com.teragrep-lsh_01-*.rpm /l
RUN dnf install -y /lsh_01.rpm && rm -f /lsh_01.rpm && dnf clean all
USER srv-lsh_01
ENTRYPOINT ["/usr/bin/java"]
CMD ["-Dproperties.file=/config/config.properties", "-jar", "/opt/teragrep/lsh_01/share/lsh_01.jar"]
CMD ["-Dproperties.file=/config/config.properties", "-Dlog4j2.configurationFile=file:/config/log4j2.xml", "-jar", "/opt/teragrep/lsh_01/share/lsh_01.jar"]
8 changes: 5 additions & 3 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ Run maven on java 11

`mvn clean package`

== How to run in docker
== How to run in a container

Mount configuration so it is in `/config/config.properties` and run.
Mount configurations to `/config/` and run.

Expected files are `/config/config.properties` and `/config/log4j2.xml`

For example

Expand All @@ -62,7 +64,7 @@ Contribution requirements:

Read more in our https://github.com/teragrep/teragrep/blob/main/contributing.adoc[Contributing Guideline].

### Contributor License Agreement
=== Contributor License Agreement

Contributors must sign https://github.com/teragrep/teragrep/blob/main/cla.adoc[Teragrep Contributor License Agreement] before a pull request is accepted to organization's repositories.

Expand Down
4 changes: 2 additions & 2 deletions rpm/src/main/resources/lsh_01.service
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Description=com.teragrep.lsh_01
ConditionPathExists=/opt/teragrep/lsh_01/share/lsh_01.jar

[Service]
ExecStart=/usr/lib/jvm/jre-1.8.0-openjdk/bin/java -Dlog4j.configuration=file:/opt/teragrep/lsh_01/etc/log4j2.xml -jar /opt/teragrep/lsh_01/share/lsh_01.jar
ExecStart=/usr/lib/jvm/jre-11-openjdk/bin/java -Dproperties.file=/opt/teragrep/lsh_01/etc/config.properties -log4j2.configurationFile=file:/opt/teragrep/lsh_01/etc/log4j2.xml -jar /opt/teragrep/lsh_01/share/lsh_01.jar
User=srv-lsh_01
WorkingDirectory=/opt/teragrep/lsh_01/etc
WorkingDirectory=/opt/teragrep/lsh_01

[Install]
WantedBy=multi-user.target