# Custom conf docker compose

**URL:** <https://softwaremill.community/t/custom-conf-docker-compose/480>\
**Category:** elasticmq\
**Created:** [March 16, 2025, 2:39am UTC](https://softwaremill.community/t/custom-conf-docker-compose/480 "2025-03-16T02:39:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gihdz](https://dub1.discourse-cdn.com/flex005/user_avatar/softwaremill.community/gihdz/32/314_2.png) [@gihdz](https://softwaremill.community/u/gihdz)\
**Post date:** [March 16, 2025, 2:39am UTC](https://softwaremill.community/t/custom-conf-docker-compose/480/1 "2025-03-16T02:39:55Z")

</div>

I’m using softwaremill/elasticmq-native docker image in a docker compose file, working great but I would like to use it with a custom conf. Can custom.conf variables be passed using `enviroment` tag in docker compose file?

e.g:

```auto
sqs-local:
    container_name: sqs-local-dev
    image: softwaremill/elasticmq-native
    environment:
      - account_id: 123123
    ports:
      - '9324:9324'
      - '9325:9325'
    volumes:
      - 'sqs:/tmp/sqs_local'

```

If not, appreciate if you could share a recommended approach on how to pass custom.conf using docker compose. Thanks!

---

<div class="post-metadata">

**Author:** ![micossow](https://dub1.discourse-cdn.com/flex005/user_avatar/softwaremill.community/micossow/32/34_2.png) [@micossow](https://softwaremill.community/u/micossow)\
**Post date:** [March 18, 2025, 7:09am UTC](https://softwaremill.community/t/custom-conf-docker-compose/480/2 "2025-03-18T07:09:53Z")

</div>

Hi @gihdz, how about passing the config as a volume mount?

```yaml
    volumes:
      - ./custom.conf:/opt/elasticmq.conf

```

A working example you can run with the source code checked out:

```yml
services:
  sqs-local:
    container_name: sqs-local-dev
    image: softwaremill/elasticmq-native
    environment:
      account_id: 123123
    ports:
      - '9324:9324'
      - '9325:9325'
    volumes:
      - './integration-tests/conf/messages-storage.conf:/opt/elasticmq.conf'
      - '.data:/elasticmq/data'

```

---

<div class="post-metadata">

**Author:** ![gihdz](https://dub1.discourse-cdn.com/flex005/user_avatar/softwaremill.community/gihdz/32/314_2.png) [@gihdz](https://softwaremill.community/u/gihdz)\
**Post date:** [March 19, 2025, 2:50pm UTC](https://softwaremill.community/t/custom-conf-docker-compose/480/3 "2025-03-19T14:50:20Z")

</div>

Worked like a charm, thanks so much @micossow !!
