Docker

26 views
Skip to first unread message

balogun tobi

unread,
Oct 10, 2019, 11:30:14 AM10/10/19
to Django users
How does one deploy an already developed django app using Docker?

vineet daniel

unread,
Oct 10, 2019, 12:09:55 PM10/10/19
to django...@googlegroups.com
Use git to clone the code within the container to fetch latest copy of code. 

On Thu, 10 Oct 2019, 20:59 balogun tobi, <blgn...@gmail.com> wrote:
How does one deploy an already developed django app using Docker?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/da969e88-ccdc-4cac-9a37-6096b3704de1%40googlegroups.com.

Nick Sarbicki

unread,
Oct 10, 2019, 12:43:51 PM10/10/19
to Django users
Don't use git inside the container, this is not the standard way of doing things.

Docker has its own guide for using django with compose. This works fine for a single server setup: https://docs.docker.com/compose/django/

- Nick


vineet daniel

unread,
Oct 14, 2019, 3:15:46 AM10/14/19
to django...@googlegroups.com
How would one use volumes if containers are to initiated after git merge/push ? (CI/CD setup).

Regards
Vineet Daniel
Cell          : +918527565696
Websites : 
Blog   |   Linkedin  |  Twitter



Nick Sarbicki

unread,
Oct 14, 2019, 5:10:07 AM10/14/19
to Django users
You would use volumes in the same way regardless of how git is used and your CI/CD is setup.



On Monday, October 14, 2019 at 8:15:46 AM UTC+1, vineet daniel wrote:
How would one use volumes if containers are to initiated after git merge/push ? (CI/CD setup).

Regards
Vineet Daniel
Cell          : +918527565696
Websites : 
Blog   |   Linkedin  |  Twitter



On Thu, Oct 10, 2019 at 10:13 PM Nick Sarbicki <nick.a...@gmail.com> wrote:
Don't use git inside the container, this is not the standard way of doing things.

Docker has its own guide for using django with compose. This works fine for a single server setup: https://docs.docker.com/compose/django/

- Nick


On Thu, Oct 10, 2019 at 5:09 PM vineet daniel <vineet...@gmail.com> wrote:
Use git to clone the code within the container to fetch latest copy of code. 

On Thu, 10 Oct 2019, 20:59 balogun tobi, <blgn...@gmail.com> wrote:
How does one deploy an already developed django app using Docker?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django...@googlegroups.com.

vineet daniel

unread,
Oct 14, 2019, 5:43:45 AM10/14/19
to django...@googlegroups.com
in reference to kubernetes cluster as well? with multiple containers? developer pushes the code to git and that invokes kube pipeline where does volume come into picture here. I might be wrong here and that's why need clarity on this. May be we are thinking differently.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ecc10a91-ca14-4c84-845d-5fed90ec12f2%40googlegroups.com.

Nick Sarbicki

unread,
Oct 14, 2019, 5:50:29 AM10/14/19
to Django users
K8S has a very different system of volumes which is separate from Docker.


For K8S you mainly need to consider what your running K8S on, AWS, GCP, bare metal etc? As well as what you are storing on your volumes and if they only need to stick around for the lifetime of the pod, or need to be kept for longer.

In most cases when we are talking about file storage over the course of an apps lifetime (i.e. needs to persist even when deploying a new pod/version) the general direction is to store files in blob storage such as AWS S3. With Django this is pretty easy to do with django-storages (https://django-storages.readthedocs.io/en/latest/).

In some cases this isn't possible, for instance storing large ML models between multiple pods - in which case you will likely need to create persistentVolumeClaim using something like AWS EFS which involves a bit more manual work.

In a few cases it may be that the data should be shipped to a database...

The right path varies wildly depending on what you think you need volumes for.

balogun tobi

unread,
Oct 15, 2019, 5:20:43 AM10/15/19
to django...@googlegroups.com
been away for a while that's why i havent replied. i have built the app already i really just need Docker for deployment 

To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/988ea33a-95b6-45b6-b535-bfa1082ca90a%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages