# Is Docker Compose supported for a single node Elasticsearch setup?

**URL:** <https://discuss.elastic.co/t/is-docker-compose-supported-for-a-single-node-elasticsearch-setup/313071>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [August 27, 2022, 9:53pm UTC](https://discuss.elastic.co/t/is-docker-compose-supported-for-a-single-node-elasticsearch-setup/313071 "2022-08-27T21:53:14Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [August 28, 2022, 3:07pm UTC](https://discuss.elastic.co/t/is-docker-compose-supported-for-a-single-node-elasticsearch-setup/313071/5 "2022-08-28T15:07:19Z")

</div>

Here is my docker compose without security yup I use it for a lot of quick stuff...

I use the `${TAG}` syntax so I can chose a version without having to code in the docker compose file

then use like

`$ TAG=8.4.0 docker-compose up`

Note `'xpack.security.enabled=false', 'xpack.security.enrollment.enabled=false'`

```auto
---
version: '3'
services:
  elasticsearch:
    container_name: es01
    image: docker.elastic.co/elasticsearch/elasticsearch:${TAG}
    # 8.x
    environment: ['ES_JAVA_OPTS=-Xms2g -Xmx2g','bootstrap.memory_lock=true','discovery.type=single-node','xpack.security.enabled=false', 'xpack.security.enrollment.enabled=false']
    
    # 7.17.X
    # environment: ['ES_JAVA_OPTS=-Xms2g -Xmx2g','bootstrap.memory_lock=true','discovery.type=single-node']

    ports:
      - 9200:9200
    networks:
      - elastic
    ulimits:
      memlock:
        soft: -1
        hard: -1
      nofile:
        soft: 65536
        hard: 65536

  kibana:
    image: docker.elastic.co/kibana/kibana:${TAG}
    container_name: kib01
    environment:
      XPACK_APM_SERVICEMAPENABLED: "true"
      XPACK_ENCRYPTEDSAVEDOBJECTS_ENCRYPTIONKEY: d1a66dfd-c4d3-4a0a-8290-2abcb83ab3aa
      LOGGING_ROOT_LEVEL: error

    ports:
      - 5601:5601
    networks:
      - elastic

networks:
  elastic:

```

---

_[View the full topic](https://discuss.elastic.co/t/is-docker-compose-supported-for-a-single-node-elasticsearch-setup/313071)._
