# Not able to load custom\_elasticsearch.yml with docker-compose

**URL:** <https://discuss.elastic.co/t/not-able-to-load-custom-elasticsearch-yml-with-docker-compose/94100>\
**Category:** Elasticsearch\
**Created:** [July 21, 2017, 10:27am UTC](https://discuss.elastic.co/t/not-able-to-load-custom-elasticsearch-yml-with-docker-compose/94100 "2017-07-21T10:27:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pilak82](https://avatars.discourse-cdn.com/v4/letter/p/898d66/32.png) [@pilak82](https://discuss.elastic.co/u/pilak82)\
**Post date:** [July 21, 2017, 10:27am UTC](https://discuss.elastic.co/t/not-able-to-load-custom-elasticsearch-yml-with-docker-compose/94100/1 "2017-07-21T10:27:34Z")

</div>

Hi all,

I'm launching Elasticsearch using docker-compose for specific demand of the project.  
I'm trying to load a custom\_elasticsearch.yml to add http.cors properties. I also tried directly inside the environment section of docker-compose.yml, it doesn't seem to be taken in count :

```
 environment:
  - cluster.name=es-docker
  - node.name=node1
  - bootstrap.memory_lock=true
  - "ES_JAVA_OPTS=-Xms256m -Xmx256m"
  - http.port=9300
  - http.cors.enabled=true
  - http.cors.allow-credentials=true
  - "http.cors.allow-headers=X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization,X-User"
  - "http.cors.allow-origin=\"*\""
  - "http.cors.allow-methods=OPTIONS,HEAD,GET,POST,PUT,DELETE"

```

...

I precise that my server is in cluster mode...  
Is it possible ? And what is the ideal configuration to do so ?

Please advise.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 18, 2017, 10:28am UTC](https://discuss.elastic.co/t/not-able-to-load-custom-elasticsearch-yml-with-docker-compose/94100/2 "2017-08-18T10:28:25Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
