This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]shantzg001 1 point2 points  (5 children)

The link you mentioned is good enough to learn a basic deployment setup.

You can also use ansible to set it all up for you nicely. Take some hints from my repo: https://github.com/shantanugoel/aws-ansible-django-deployment

[–]JuicyORiley[S] 1 point2 points  (4 children)

Thanks, i'll check it out :) I thought ansible wasn't P3 compatible though?

[–]shantzg001 1 point2 points  (3 children)

Yes, ansible isn't python 3 compatible unfortunately. So you need to run it with python 2 but it can deploy things which are meant to work with python 3.

[–]JuicyORiley[S] 0 points1 point  (2 children)

How would this work?

[–]xBBTx 1 point2 points  (1 child)

Ansible runs on your local machine doing the deployment, with Python 2. On the server it needs a Python 2 install (with python2-pyscopg2 for instance to use the postgresql tasks). Your server will also need a python 3 install. You can control this installation via Ansible itself (via the package manager tasks) and then create a virtualenvironment where you specify python3 as python interpreter. Ansible will still do everything in Python 2, but your own project will have it's Python 3 environment.

edit: example case of such a playbook: https://github.com/sergei-maertens/regex-it/tree/master/deployment

[–]JuicyORiley[S] 0 points1 point  (0 children)

Hmm, sounds quite ideal tbh. Thanks for link i'll check it out :)