[Pycharm] Unable to use the debugger in a dockerized Django app

I’ve followed the Pycharm setup guide by adding DOPPLER_ENV and DOPPLER_TOKEN environment variables to my run/debug configurations, and it works when I try to run my docker-compose containers.


Docker-compose config

The app starts when I run through the config, or by executing docker compose up, but the problem is that I’m not able to attach a debugger to my Django container this way. The way I used to attach the debugger before I started using Doppler was via the django server debug config, but even with the DOPPLER_ENV and DOPPLER_TOKEN environment variables set within the run config, my environment variables are never passed to the process, so my app can never start.

Django server config (link because I wasn’t allowed to upload two images in the same post).

I heavily rely on the debugger for development, so this is a deal breaker for me. Is there a way around this issue?