Yes, it sounds like HashiCorp vault is more in line with what I am looking for. Though when people talk about using secrets for python they suggest hardcoding the secret path into the application.
I basically did what this website said with my docker-compose file.
Reading about secrets here, one of the users suggests after running the docker compose with the secrets
to " Now your app can access the secret file at /run/secrets/secrets_yaml
. You can either hardcode this path in your application or create a symbolic link."
This is the part I’m having trouble with. If you hardcode the path into the application then someone else can just go access it later, since the secrets are readonly files within an image?