# Environment variable using docker-compose is always null

**URL:** <https://forum.elixirforum.com/t/environment-variable-using-docker-compose-is-always-null/41073>\
**Category:** Questions\
**Tags:** docker, docker-compose\
**Created:** [July 16, 2021, 1:10am UTC](https://forum.elixirforum.com/t/environment-variable-using-docker-compose-is-always-null/41073 "2021-07-16T01:10:45Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![CAIOHOBORGHI](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/caiohoborghi/32/20862_2.png) [@CAIOHOBORGHI](https://forum.elixirforum.com/u/CAIOHOBORGHI)\
**Post date:** [July 16, 2021, 11:27am UTC](https://forum.elixirforum.com/t/environment-variable-using-docker-compose-is-always-null/41073/5 "2021-07-16T11:27:38Z")

</div>

Hello again Sebb, thanks for the help.

I’m using

```elixir
mix run

```

To start the application and running

```elixir
System.get_env("MY_VAR")

```

Inside a file being “supervised” by a Supervisor, would this change anything?

I’ll test the code you’ve sent

---

_[View the full topic](https://forum.elixirforum.com/t/environment-variable-using-docker-compose-is-always-null/41073)._
