# Howto modify num\_of\_shards with docker-compose

**URL:** <https://discuss.elastic.co/t/howto-modify-num-of-shards-with-docker-compose/298868>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [March 4, 2022, 5:23pm UTC](https://discuss.elastic.co/t/howto-modify-num-of-shards-with-docker-compose/298868 "2022-03-04T17:23:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rschirin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rschirin/32/45283_2.png) [@rschirin](https://discuss.elastic.co/u/rschirin)\
**Post date:** [March 4, 2022, 5:23pm UTC](https://discuss.elastic.co/t/howto-modify-num-of-shards-with-docker-compose/298868/1 "2022-03-04T17:23:03Z")

</div>

Hey there,  
is there a way to modify the `number_of_shards` via docker-compose or to provide an _index template_?

---

<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:** [April 1, 2022, 5:23pm UTC](https://discuss.elastic.co/t/howto-modify-num-of-shards-with-docker-compose/298868/2 "2022-04-01T17:23:55Z")

</div>

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