# Using PyCharm Docker compose

**URL:** <https://community.doppler.com/t/using-pycharm-docker-compose/705>\
**Category:** Need Help\
**Created:** [July 30, 2022, 3:08pm UTC](https://community.doppler.com/t/using-pycharm-docker-compose/705 "2022-07-30T15:08:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnsturgeon](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/johnsturgeon/32/478_2.png) [@johnsturgeon](https://community.doppler.com/u/johnsturgeon)\
**Post date:** [July 30, 2022, 3:08pm UTC](https://community.doppler.com/t/using-pycharm-docker-compose/705/1 "2022-07-30T15:08:33Z")

</div>

I currently use PyCharm to do my Docker container development, and I want to add environment variables to my `docker-compose` yaml file.

Right now, PyCharm integrates with Docker so that it runs `docker compose up` when bringing up the container.

I would like to use Doppler variables for my ports like this:

```nohighlight
version: "3.8"
services:
  tgfp-test-mongodb:
    build:
      context: .
      dockerfile: ./Dockerfile-Dev
    container_name: tgfp-test-mongodb
    ports:
      - "${MONGO_PORT}:${MONGO_PORT}"

```

But those variables are not set unless I don’t use the the native docker compose up command in my build config and make my own with `doppler run -- compose blah blah`

is there another way in PyCharm to get those variables in to my docker compose file when running?

---

<div class="post-metadata">

**Author:** ![rsimplify](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/rsimplify/32/862_2.png) [@rsimplify](https://community.doppler.com/u/rsimplify)\
**Post date:** [August 1, 2023, 10:50pm UTC](https://community.doppler.com/t/using-pycharm-docker-compose/705/2 "2023-08-01T22:50:45Z")

</div>

Did you ever find a solution to this? We’re trying to setup our Docker pipelines with PyCharm and have had issues with Doppler every way we’ve tried.

---

<div class="post-metadata">

**Author:** ![watsonian](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/watsonian/32/267_2.png) [@watsonian](https://community.doppler.com/u/watsonian)\
**Post date:** [August 2, 2023, 6:15pm UTC](https://community.doppler.com/t/using-pycharm-docker-compose/705/3 "2023-08-02T18:15:03Z")

</div>

Hi @johnsturgeon @rsimplify!

Sorry for not replying on this thread earlier! Did you all take a look at our docs surrounding Docker Compose?

> **[Docker Compose](https://docs.doppler.com/docs/docker-compose)**
>
> reading time 5 mins

Generally speaking, you should be able to use `doppler run -- docker-compose up`, but you’ll need to specify which variables get passed through to your containers in the `docker-compose.yml` file.

If that’s not working for you, could you elaborate a bit around what’s going wrong specifically?

Regards,  
-Joel
