Skip to content

Commit 4d52d23

Browse files
committed
Simplify ES Docker configuration
1 parent b58eb2c commit 4d52d23

File tree

4 files changed

+3
-16
lines changed

4 files changed

+3
-16
lines changed

deploy/.env-example

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ NIFI_ENV_FILE=../security/nifi.env-example
99
NIFI_SECURITY_DIR=../security/
1010

1111
# Elasticsearch
12-
ELASTICSEARCH_ENV_FILE=../security/elasticsearch.env-example
1312
ELASTICSEARCH_SECURITY_DIR=../security/
1413

1514
# define below the local paths for NLP resources

deploy/services.yml

-2
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,6 @@ services:
297297

298298
- logger.level=INFO
299299

300-
#env_file:
301-
# - ${ELASTICSEARCH_ENV_FILE}
302300
volumes:
303301
# INFO: ES configuration mapped via volume (make sure to comment this and uncomment the next line if you are using NATIVE elasticsearch deployment)
304302
- ../services/elasticsearch/config/elasticsearch_opensearch.yml:/usr/share/opensearch/config/opensearch.yml:ro

docs/deploy/main.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,12 @@ For custom deployments, copy `.env-examples` files to `.env` (which are not trac
3737
```bash
3838
cp deploy/.env-example deploy/.env
3939
cp security/nifi.env-example security/nifi.env
40-
cp security/elasticsearch.env-example security/elasticsearch.env
4140
```
4241

4342
### Multiple deployments on the same machine
44-
When deploying multiple docker-compose projects on the same machine (e.g. for dev or testing), it can be useful to remove all containers, volume and network names from the docker-compose file, and let [Docker create names](https://docs.docker.com/compose/reference/envvars/#compose_project_name) based on `COMPOSE_PROJECT_NAME` in `deploy/.env`. You will also need add this project name as prefix and `_1` as suffix to URLs when connecting containers. For example, the Kibana service should contain:
45-
```yml
46-
ELASTICSEARCH_URL: http://${COMPOSE_PROJECT_NAME}_elasticsearch-1_1:9200
47-
```
43+
When deploying multiple docker-compose projects on the same machine (e.g. for dev or testing), it can be useful to remove all containers, volume and network names from the docker-compose file, and let [Docker create names](https://docs.docker.com/compose/reference/envvars/#compose_project_name) based on `COMPOSE_PROJECT_NAME` in `deploy/.env`. Docker will automatically create a Docker network and makes sure that containers can find each other by container name.
44+
45+
For example, when setting `COMPOSE_PROJECT_NAME=cogstack-prod`, Docker Compose will create a container named `cogstack-prod_elasticsearch-1_1` for the `elasticsearch-1` service. Within the NiFi container, which is running in the same Docker network, you can refer to that container using just the service name `elasticsearch-1`.
4846

4947
## Troubleshooting
5048

security/elasticsearch.env-example

-8
This file was deleted.

0 commit comments

Comments
 (0)