You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
Jack Gronke Jr ff7e6e01b6 Fresh start 2 months ago
config Fresh start 2 months ago
.env Fresh start 2 months ago
Dockerfile Fresh start 2 months ago
LICENSE Fresh start 2 months ago
README.md Fresh start 2 months ago
docker-compose.yml Fresh start 2 months ago

README.md

docker-elastic-caddy

Purpose

This project utilizes docker compose to deploy a basic elastic stack (Elastic x3 / Kibana x1) with a caddy frontend. This is most definitely not a production ready configuration/setup.

Configuration Requirements

Obviously, this configuration requires docker and docker compose installed on the host.

Elastic is resource heavy! As such, the host must have AT LEAST 8GB of ram, 4 VCPU, and 100GB of storage. This minimum configuration is good for short-term testing only. I test on Oracle's OCI Ampere (free) instances.

Two subdomains (elastic.example.com, kibana.example.com) must be pointed to the host, and typical http/https ports must be reachable. A third subdomain (fleet.example.com) is optionally used to route access to the fleet server through caddy.

Instructions

  1. Clone this repository
  2. Configure the Important Settings
  3. Execute docker compose up -d
  4. Profit

Important settings

For the most part, simply replace example.com with your domain. I'll probably streamline these settings soon.

The following files currently require modification:

.env

  • Define passwords for elastic and kibana users
  • Set appropriate memory limits. This value is per elastic search instance. The default 2GB amounts to 6GB used by the 3 elastic search instances.
# Password for the 'elastic' user (at least 6 characters)
ELASTIC_PASSWORD=YourSuperSecretPasswordHere
# Password for the 'kibana_system' user (at least 6 characters)
KIBANA_PASSWORD=AnotherSecretPasswordHere

# Increase or decrease based on the available host memory (in bytes)
# (2GB currently)
MEM_LIMIT=2048000000

docker-compose.yml

  • Replace example.com with your domain. It is listed three times in this file.

config/Caddyfile

  • Replace all instances of example.com with your domain. You must change it at least twice, for the elastic and kibana subdomains.

config/elasticsearch.yml

  • Replace example.com with your domain.
http.publish_host: ["elastic.example.com"]

config/kibana.yml

  • Replace example.com with your domain.
server.publicBaseUrl: "https://kibana.example.com"