[Django]-Django save files from FileField in docker container

2πŸ‘

βœ…

I’m not sure it will solve your problem but if you want to share the data from a named volume between containers using docker-compose, you need to add these volumes to all these containers or use extension fields.

As the first thing is easier, just add

    volumes:
      - media:/code/media

to your mail service in docker-compose.

After that rebuild your container.

Then, when it’s running, run docker exec -it <image id> sh and check if /code/media is there.

πŸ‘€Tom Wojcik

Leave a comment