![]() |
2 months ago | |
---|---|---|
config | 2 months ago | |
.env | 2 months ago | |
Dockerfile | 2 months ago | |
LICENSE | 2 months ago | |
README.md | 2 months ago | |
docker-compose.yml | 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
- Clone this repository
- Configure the Important Settings
- Execute
docker compose up -d
- 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"