How to Use Django File Storage to Share Files Between an API and a Worker How to Use Django File Storage to Share Files Between an API and a Worker docker docker

How to Use Django File Storage to Share Files Between an API and a Worker


If you're in docker compose, just create a shared docker volume between your api and worker and mount it at a well-known point in both containers, like /mnt/share. Make sure to save the files there in the API and then the worker can access them using the same model since the settings (e.g., MEDIA_ROOT) will point both the API and the Worker to /mnt/share.