Skip to content
Snippets Groups Projects
Commit 1ce5b891 authored by nimrod's avatar nimrod
Browse files

Initial setup.

parent 5373b93e
No related branches found
No related tags found
No related merge requests found
.env 0 → 100644
COMPOSE_PROJECT_NAME=es
......@@ -2,3 +2,25 @@
include:
- project: shore/ci-templates
file: templates/pre-commit.yml
- project: shore/ci-templates
file: templates/docker.yml
stages:
- test
- build
- deploy
build:
extends: .compose-build
tags: &tags [host01.shore.co.il]
variables:
DOCKER_BUILDKIT: ""
COMPOSE_DOCKER_CLI_BUILD: ""
pull:
extends: .compose-pull
tags: *tags
run:
extends: .compose-run
tags: *tags
*
!crontab
!config.yml
!actions.yml
# hadolint ignore=DL3006
FROM registry.shore.co.il/cron
USER root
# hadolint ignore=DL3018
RUN apk add --update --no-cache py3-pip
RUN python3 -m pip install --no-cache-dir elasticsearch-curator==5.8.4
USER nobody
COPY --chown=root:root config.yml actions.yml /etc/curator/
---
actions:
1:
action: delete_indices
description: Delete old indices
ignore_empty_list: True
filters:
- filtertype: pattern
kind: timestring
value: '%Y.%m.%d'
- filtertype: age
source: name
direction: older
timestring: '%Y.%m.%d'
unit: days
unit_count: 3
---
client:
hosts:
- elasticsearch
0 3 * * * curator --config /etc/curator/config.yml /etc/curator/actions.yml || wget --spider https://notify.shore.co.il/send?message=Elasticsearch%20curator%20failed.
---
version: '3.7'
services:
curator:
build:
context: curator
links:
- elasticsearch
restart: always
elasticsearch:
environment:
'node.name': elasticsearch.shore.co.il
'cluster.name': shore.co.il
'discovery.type': single-node
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:9200/_cat/health"]
image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2
restart: always
volumes:
- elasticsearch:/usr/share/elasticsearch/data
kibana:
environment:
ELASTICSEARCH_HOSTS: |
["http://elasticsearch:9200"]
TELEMETARY_OPTIN: !!str false
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:5601/api/status"]
image: docker.elastic.co/kibana/kibana-oss:7.10.2
links:
- elasticsearch
restart: always
volumes:
elasticsearch:
networks:
default:
name: shore
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment