1

I am attempting to create a mounted volume within a docker swarm and access it from a webapp (Django). I create the volume, go into a container and it is there. However, my Django app is is getting a 404 when attempting to access any image. The directory and branch I'm using is identical to production.

So, my question is, are there any permission issues that I should be aware of that could be causing this problem? Or possibly the way in which volumes on a container is created which would be causing this problem?

How volume it set in compose:

volumes:
  - /mnt/intranet_videos:/mnt/intranet/video
  - /mnt/intranet_media/intranet:/mnt/intranet/media

Attached Image (Side by side of production OS next to container in Swarm) Side by side of production OS next to container in Swarm

Obj3ctiv3_C_88
  • 1,478
  • 1
  • 17
  • 29
  • 1
    This may help you: https://stackoverflow.com/questions/41462261/how-do-i-serve-media-files-in-a-local-django-environment – bluescores Jun 23 '17 at 19:25
  • @PhilipBailey Thanks, I thought that may have been the issue so I'm currently running with debug off but still no luck :/ – Obj3ctiv3_C_88 Jun 23 '17 at 19:28
  • I didn't mean DEBUG necessarily, I meant DNS resolution for your local environment. Assuming that you don't have a web server running in the container, which serve up those media files for your app server. – bluescores Jun 23 '17 at 19:48
  • @PhilipBailey Sorry, I probably should have been more descriptive on that front. Since we're attempting to move our stack to docker I'm running almost identical to production. Everything else has worked great to this point with only this lone obstacle. I'm serving through gunicorn which I call in the compose and it is being accessed through an Nginx proxy pass. – Obj3ctiv3_C_88 Jun 23 '17 at 19:55

0 Answers0