Skip to content

Commit

Permalink
Fixes logger, docker and systemd servicefile related issues (#24)
Browse files Browse the repository at this point in the history
* Fixes logger related issues

* Change docker->container in how to title
  • Loading branch information
StrongestNumber9 authored Apr 4, 2024
1 parent 015d893 commit c98d054
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
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

0 comments on commit c98d054

Please sign in to comment.