| Russian | English | Spanish | Chinese | French | German |
|---|---|---|---|---|---|
| Русский | Selected | Español | 中文 | Français | Deutsch |
This project provides a ready-to-use Elasticsearch + analysis-icu + analysis-phonetic + Kibana stack with an Nginx reverse proxy for easy access.
- Docker 20.10+ and Docker Compose 2.0+
- 4+ GB of free RAM
- Ports 8080 and 9200 must be available on the host
- Existing Docker network
external_network(remove from docker-compose.yml if not needed)
.
├── .docker.env (created by command or manually)
├── .docker.env.example
├── .gitignore
├── docker-compose.yml
├── Makefile
├── README.md
├── langs
│ ├── ...localized README.md files...
├── assets
│ ├── ...content for README.md...
├── docker-configs
│ ├── elasticsearch
│ │ ├── Dockerfile
│ │ └── elasticsearch.yml
│ ├── kibana
│ │ ├── Dockerfile
│ │ ├── kibana.yml
│ │ └── wait-for-elastic.sh
│ └── nginx
│ ├── Dockerfile
│ └── default.conf.template
└── data
├── ...created for the project in .env...
Main environment variables (file .docker.env):
| Variable | Default Value | Description |
|---|---|---|
| COMPOSE_PROJECT_NAME | elasticsearch | Project name |
| ELASTIC_VERSION | latest | Elasticsearch version |
| KIBANA_VERSION | latest | Kibana version |
| NGINX_VERSION | latest | Nginx version |
| ELASTIC_CONTAINER | elasticsearch | Elasticsearch container name |
| KIBANA_CONTAINER | kibana | Kibana container name |
| NGINX_CONTAINER | nginx | Nginx container name |
| KIBANA_DOMAIN | kibana.local | Domain for accessing Kibana |
| ELASTIC_DOMAIN | elastic.local | Domain for accessing Elasticsearch |
| KIBANA_PORT | 5601 | Kibana port on the host |
| ELASTIC_PORT | 9200 | Elasticsearch port on the host |
| NGINX_PORT | 80 | Nginx port on the host |
| ELASTIC_DATA_DIR | ./data/elasticsearch | Elasticsearch data storage |
| KIBANA_DATA_DIR | ./data/kibana | Kibana data storage |
| EXTERNAL_NETWORK | external_network | External Docker network |
- Elasticsearch:
- Single-node cluster
- Allocated 2GB RAM
- Pre-installed
analysis-icuplugin - Pre-installed
analysis-phoneticplugin - Synonyms configuration via
synonyms.txt
- Kibana:
- Automatic wait for Elasticsearch readiness
- Configured reverse proxy via Nginx
- Nginx:
- Reverse proxy for Elasticsearch and Kibana
git clone https://github.com/yourusername/docker-elasticsearch.git
cd docker-elasticsearchIf you are using Windows, check the Makefile for a full list of commands. It is recommended to use either Linux or Windows + WSL.
Run:
make initThis will create a .docker.env file and the directories for storing files (ELASTIC_DATA_DIR, KIBANA_DATA_DIR).
Run:
make pullThis will download images based on the versions specified in ELASTIC_VERSION, KIBANA_VERSION, NGINX_VERSION.
Run:
make upIf you encounter an error:
network onex_backend declared as external, but could not be found
This means you did not specify an external network (the project network that Elasticsearch should connect to). Two options:
- Specify an existing network in
.docker.envunderEXTERNAL_NETWORK - Remove the following from
docker-compose.yml:
For the elasticsearch service:
- external_network
For networks:
external_network:
name: ${EXTERNAL_NETWORK}
external: true
- Build images without cache:
make build - Stop containers:
make down - "Hard" restart:
make reset - "Soft" restart:
make restart - Enter a specific container:
make in <container> - View logs of a specific container:
make log <container>
After starting, services are available via Nginx:
- Kibana: http://
${KIBANA_DOMAIN}:${NGINX_PORT} - Elasticsearch: http://
${ELASTIC_DOMAIN}:${NGINX_PORT}
By default:
- Kibana: http://kibana.local:80
- Elasticsearch: http://elastic.local:80
Don't forget to add domains to the hosts file:
- For Windows:
C:\Windows\System32\drivers\etc\hosts - For Linux:
/etc/hosts
Example:
127.0.0.1 elastic.local
127.0.0.1 kibana.local
Access Elasticsearch via browser (http://elastic.local:80):
Access Kibana via browser (http://kibana.local:80):





