-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
557 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM node:10-alpine | ||
|
||
ENV NODE_ENV=production | ||
|
||
RUN mkdir /app | ||
WORKDIR /app | ||
|
||
COPY package.json . | ||
|
||
RUN npm install --production | ||
|
||
COPY . . | ||
|
||
CMD ["npm", "start"] |
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,29 @@ | ||
version: "3" | ||
|
||
services: | ||
|
||
dev: | ||
image: node:10-alpine | ||
expose: | ||
- "3000" | ||
ports: | ||
- "3000:3000" | ||
env_file: env | ||
environment: | ||
PORT: 3000 | ||
|
||
working_dir: /src | ||
volumes: | ||
- ../..:/src | ||
|
||
command: /bin/sh -c "npm install && npm run dev" | ||
|
||
links: | ||
- mongo | ||
depends_on: | ||
- mongo | ||
|
||
mongo: | ||
image: mongo | ||
# volumes: | ||
# - ../../db:/data/db |
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,5 @@ | ||
NODE_ENV=development | ||
LOGLEVEL=debug | ||
CACHER=false | ||
MONGO_URI=mongodb://mongo/moleculer-blog | ||
SERVICEDIR=services |
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,7 @@ | ||
ARG ELK_VERSION | ||
|
||
# https://github.com/elastic/elasticsearch-docker | ||
FROM docker.elastic.co/elasticsearch/elasticsearch-oss:${ELK_VERSION} | ||
|
||
# Add your elasticsearch plugins setup here | ||
# Example: RUN elasticsearch-plugin install analysis-icu |
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,16 @@ | ||
--- | ||
## Default Elasticsearch configuration from elasticsearch-docker. | ||
## from https://github.com/elastic/elasticsearch-docker/blob/master/build/elasticsearch/elasticsearch.yml | ||
# | ||
cluster.name: "docker-cluster" | ||
network.host: 0.0.0.0 | ||
|
||
# minimum_master_nodes need to be explicitly set when bound on a public IP | ||
# set to 1 to allow single node clusters | ||
# Details: https://github.com/elastic/elasticsearch/pull/17288 | ||
discovery.zen.minimum_master_nodes: 1 | ||
|
||
## Use single node discovery in order to disable production mode and avoid bootstrap checks | ||
## see https://www.elastic.co/guide/en/elasticsearch/reference/current/bootstrap-checks.html | ||
# | ||
discovery.type: single-node |
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 @@ | ||
Third-party extensions that enable extra integrations with the ELK stack. |
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 @@ | ||
FROM alpine:3.8 | ||
|
||
ENV CURATOR_VERSION=5.5.4 | ||
|
||
RUN apk --update add --no-cache tini python py-pip \ | ||
&& pip install elasticsearch-curator==${CURATOR_VERSION} | ||
|
||
COPY entrypoint.sh / | ||
|
||
WORKDIR /usr/share/curator | ||
COPY config ./config | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] |
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,18 @@ | ||
# Curator | ||
|
||
Elasticsearch Curator helps you curate or manage your indices. | ||
|
||
## Usage | ||
|
||
If you want to include the Curator extension, run Docker Compose from the root of the repository with an additional | ||
command line argument referencing the `curator-compose.yml` file: | ||
|
||
```bash | ||
$ docker-compose -f docker-compose.yml -f extensions/curator/curator-compose.yml up | ||
``` | ||
|
||
All configuration files are available in the `config/` directory. | ||
|
||
## Documentation | ||
|
||
https://github.com/elastic/curator |
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,24 @@ | ||
--- | ||
# Remember, leave a key empty if there is no value. None will be a string, | ||
# not a Python "NoneType" | ||
client: | ||
hosts: | ||
- ${ELASTICSEARCH_HOST} | ||
port: 9200 | ||
url_prefix: | ||
use_ssl: False | ||
certificate: | ||
client_cert: | ||
client_key: | ||
aws_key: | ||
aws_secret_key: | ||
aws_region: | ||
ssl_no_validate: False | ||
http_auth: | ||
timeout: 30 | ||
master_only: False | ||
|
||
logging: | ||
loglevel: DEBUG | ||
logfile: /usr/share/curator/curator.log | ||
logformat: default |
20 changes: 20 additions & 0 deletions
20
docker/extensions/curator/config/delete_log_files_curator.yml
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,20 @@ | ||
actions: | ||
1: | ||
action: delete_indices | ||
description: >- | ||
Delete indices. Find which to delete by first limiting the list to logstash- | ||
prefixed indices. Then further filter those to prevent deletion of anything | ||
less than ${UNIT_COUNT} days old. Ignore the error if the filter does not result in an | ||
actionable list of indices (ignore_empty_list) and exit cleanly. | ||
options: | ||
ignore_empty_list: True | ||
disable_action: False | ||
filters: | ||
- filtertype: pattern | ||
kind: prefix | ||
value: logstash- | ||
- filtertype: age | ||
source: creation_date | ||
direction: older | ||
unit: days | ||
unit_count: ${UNIT_COUNT} |
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,18 @@ | ||
version: '2' | ||
|
||
services: | ||
|
||
|
||
curator: | ||
build: | ||
context: extensions/curator/ | ||
environment: | ||
ELASTICSEARCH_HOST: elasticsearch | ||
CRON: 0 0 * * * | ||
CONFIG_FILE: /usr/share/curator/config/curator.yml | ||
COMMAND: /usr/share/curator/config/delete_log_files_curator.yml | ||
UNIT_COUNT: 2 | ||
networks: | ||
- elk | ||
depends_on: | ||
- elasticsearch |
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,6 @@ | ||
#!/bin/sh | ||
|
||
echo "$CRON /usr/bin/curator --config ${CONFIG_FILE} ${COMMAND}" >>/etc/crontabs/root | ||
|
||
# https://github.com/krallin/tini/blob/master/README.md#subreaping | ||
tini -s -- crond -f -d 8 -l 8 |
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,5 @@ | ||
# uses ONBUILD instructions described here: | ||
# https://github.com/gliderlabs/logspout/tree/master/custom | ||
|
||
FROM gliderlabs/logspout:master | ||
ENV SYSLOG_FORMAT rfc3164 |
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,28 @@ | ||
# Logspout extension | ||
|
||
Logspout collects all Docker logs using the Docker logs API, and forwards them to Logstash without any additional | ||
configuration. | ||
|
||
## Usage | ||
|
||
If you want to include the Logspout extension, run Docker Compose from the root of the repository with an additional | ||
command line argument referencing the `logspout-compose.yml` file: | ||
|
||
```bash | ||
$ docker-compose -f docker-compose.yml -f extensions/logspout/logspout-compose.yml up | ||
``` | ||
|
||
In your Logstash pipeline configuration, enable the `udp` input and set the input codec to `json`: | ||
|
||
``` | ||
input { | ||
udp { | ||
port => 5000 | ||
codec => json | ||
} | ||
} | ||
``` | ||
|
||
## Documentation | ||
|
||
https://github.com/looplab/logspout-logstash |
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,18 @@ | ||
#!/bin/sh | ||
|
||
# unmodified from: | ||
# https://github.com/gliderlabs/logspout/blob/67ee3831cbd0594361bb3381380c65bdbeb3c20f/custom/build.sh | ||
|
||
set -e | ||
apk add --update go git mercurial build-base | ||
mkdir -p /go/src/github.com/gliderlabs | ||
cp -r /src /go/src/github.com/gliderlabs/logspout | ||
cd /go/src/github.com/gliderlabs/logspout | ||
export GOPATH=/go | ||
go get | ||
go build -ldflags "-X main.Version=$1" -o /bin/logspout | ||
apk del go git mercurial build-base | ||
rm -rf /go /var/cache/apk/* /root/.glide | ||
|
||
# backwards compatibility | ||
ln -fs /tmp/docker.sock /var/run/docker.sock |
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,16 @@ | ||
version: '2' | ||
|
||
services: | ||
logspout: | ||
build: | ||
context: extensions/logspout | ||
volumes: | ||
- /var/run/docker.sock:/var/run/docker.sock:ro | ||
environment: | ||
ROUTE_URIS: logstash://logstash:5000 | ||
LOGSTASH_TAGS: docker-elk | ||
networks: | ||
- elk | ||
depends_on: | ||
- logstash | ||
restart: on-failure |
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 @@ | ||
package main | ||
|
||
// installs the Logstash adapter for Logspout, and required dependencies | ||
// https://github.com/looplab/logspout-logstash | ||
import ( | ||
_ "github.com/looplab/logspout-logstash" | ||
_ "github.com/gliderlabs/logspout/transports/udp" | ||
_ "github.com/gliderlabs/logspout/transports/tcp" | ||
) |
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,7 @@ | ||
ARG ELK_VERSION | ||
|
||
# https://github.com/elastic/kibana-docker | ||
FROM docker.elastic.co/kibana/kibana-oss:${ELK_VERSION} | ||
|
||
# Add your kibana plugins setup here | ||
# Example: RUN kibana-plugin install <name|url> |
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,7 @@ | ||
--- | ||
## Default Kibana configuration from kibana-docker. | ||
## from https://github.com/elastic/kibana-docker/blob/master/build/kibana/config/kibana.yml | ||
# | ||
server.name: kibana | ||
server.host: "0" | ||
elasticsearch.url: http://elasticsearch:9200 |
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,7 @@ | ||
ARG ELK_VERSION | ||
|
||
# https://github.com/elastic/logstash-docker | ||
FROM docker.elastic.co/logstash/logstash-oss:${ELK_VERSION} | ||
|
||
# Add your logstash plugins setup here | ||
# Example: RUN logstash-plugin install logstash-filter-json |
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,6 @@ | ||
--- | ||
## Default Logstash configuration from logstash-docker. | ||
## from https://github.com/elastic/logstash-docker/blob/master/build/logstash/config/logstash-oss.yml | ||
# | ||
http.host: "0.0.0.0" | ||
path.config: /usr/share/logstash/pipeline |
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 @@ | ||
input { | ||
tcp { | ||
port => 5000 | ||
} | ||
} | ||
|
||
## Add your filters / logstash plugins configuration here | ||
|
||
output { | ||
elasticsearch { | ||
hosts => "elasticsearch:9200" | ||
} | ||
} |
Oops, something went wrong.