-
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.
Add README.md and docker-compose.yml example
- Loading branch information
Showing
3 changed files
with
80 additions
and
1 deletion.
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,9 @@ | ||
FROM openjdk:9-jre-slim | ||
|
||
LABEL maintainer="[email protected]" | ||
LABEL org.label-schema.build-date="$(date)" | ||
LABEL org.label-schema.vcs-url="https://github.com/saintzyo/logstation-docker" | ||
LABEL org.label-schema.vcs-tool-url="https://github.com/jdrews/logstation" | ||
|
||
ARG VERSION=0.3.11 | ||
|
||
|
@@ -16,4 +20,3 @@ VOLUME [ "/opt/logstation" ] | |
EXPOSE 8884 | ||
|
||
CMD [ "java", "-jar", "logstation.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Docker Logstation Image | ||
|
||
## Preparation | ||
|
||
### General | ||
Logstation main folder - `/opt/logstation` and it is set as WORKDIR. | ||
Logstation main config file - `/opt/logstation/logstation.conf` and it exists with default content. | ||
Logstation log dir - `/opt/logstation/logs` - empty by defaullt. You should change your own config regarding this path or just mount your logs wherever you want. | ||
|
||
### docker-compose file | ||
Here is an example using docker-compose.yml: | ||
|
||
```yml | ||
version: "2" | ||
services: | ||
logstation: | ||
image: saintzyo/logstation:0.3.11 | ||
ports: | ||
- "8884:8884" | ||
volumes: | ||
- ./logstation.conf:/opt/logstation/logstation.conf | ||
- /var/logs/nginx:/opt/logstation/logs | ||
``` | ||
### logstation.conf file | ||
When container starts it generates default `logstation.conf` file. You should override it with your own parameters like in the example below: | ||
|
||
```json | ||
logstation { | ||
# Unix example of setting up logs | ||
logs=["/opt/logstation/logs/access.log","/opt/logstation/logs/error.log"] | ||
# Setup your syntax below | ||
# <some-name>=[<RGB_HEX>,<regex-for-line-matching>] | ||
# matching gives priority to the top most | ||
syntax { | ||
# red | ||
error=["#FF1F1F",".*ERROR.*"] | ||
# yellow | ||
warn=["#F2FF00",".*WARN.*"] | ||
# green | ||
info=["#00FF2F",".*INFO.*"] | ||
# blue | ||
debug=["#4F9BFF",".*DEBUG.*"] | ||
# cyan | ||
trace=["#4FFFF6",".*TRACE.*"] | ||
} | ||
# Web Server Port | ||
# The port used to connect to the LogStation | ||
webServerPort=8884 | ||
# Number of lines to display per log file | ||
# any logs over this will truncate the oldest lines from the page | ||
maxLogLinesPerLog=1500 | ||
# Number of messages to buffer on server | ||
# These will be sent to any new connections so they have some history of logs | ||
# bufferLength is multiplied by number of logs, and buffered on best effort for each log | ||
bufferLength=10 | ||
# Unique name for logstation instance | ||
# This name will be prepended to the browser tab | ||
# Can be useful when connecting to multiple logstations | ||
logStationName="Logstation" | ||
} | ||
``` |
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,9 @@ | ||
version: "2" | ||
services: | ||
logstation: | ||
image: saintzyo/logstation:0.3.11 | ||
ports: | ||
- 8884:8884 | ||
volumes: | ||
- ./logstation.conf:/opt/logstation/logstation.conf | ||
- /var/logs/nginx:/opt/logstation/logs |