What I'm trying to do is to pass system variables from the docker-compose to my api. And when I try to do this I get errors. And I wanted to know if it's possible to do it. Or is there any other more elegant way to do this?
Note that the env! macro reads these variables during compile time, which I don't think is what you are looking for. So I believe a static LazyLock calling env::var as paramagnetic also suggested is the better approach.
Yeah, it's true. I've tried it and it's no what I was looking for. It's a weekend now, so I don't think it's the right time to solve this puzzle. I'll return to this task on next Monday =)