Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/buildwithlal/django-nginx-uwsgi-ansible
Deploy Django with Postgres on Nginx and uWSGI using Ansible
https://github.com/buildwithlal/django-nginx-uwsgi-ansible
ansible-playbook ansible-roles django nginx uwsgi
Last synced: 3 months ago
JSON representation
Deploy Django with Postgres on Nginx and uWSGI using Ansible
- Host: GitHub
- URL: https://github.com/buildwithlal/django-nginx-uwsgi-ansible
- Owner: BuildWithLal
- Created: 2016-11-06T13:09:28.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-12-18T18:57:22.000Z (about 8 years ago)
- Last Synced: 2024-07-31T22:51:48.449Z (6 months ago)
- Topics: ansible-playbook, ansible-roles, django, nginx, uwsgi
- Size: 6.84 KB
- Stars: 2
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Deploy Django and Postgres on Nginx and uWSGI
We are using Vagrant and Ansible to deploy Django application on Vagrant box but you can reuse same ansible playbook to deploy on any other Ubuntu server 14.04. We are using Python virtualenv to deploy Django application.Nginx is acting as a reverse proxy, handling `/static/` and `/media/` contents.
uWSGI is serving Django application
####Enviroment
```
1. Vagrant=1.8
2. Ansible=2.1
3. Ubuntu Server=14.04 trusty
4. Python=2.7
5. Django=1.10
6. Postgresql=9.4
7. Nginx
8. uWSGI
```####NOTE:
1. Update `Vagrantfile` to change your synced_folders.
```
config.vm.synced_folder "./mysite", "/var/www/mysite"
```
2. Update `inventory.ini` to replace your server IP or host name instead of `web`
3. Update `shared_vars.main`, `/roles/setup/vars/main.yml`, `/roles/deploy/vars/main.yml` and `/roles/setup/templates`
to make your desired changes i.e http port, django settings module, project dir, Nginx and uWSGI logs etc####Using Vagrant
```
# Switch to directory and run command to create machine and run provisions
vagrant up# run provisions if machine is already created
vagrant provisions```
####Using Ansible directly
Switch to directory and run command to run provisions on machine listed in inventory.ini
```
ansible-playbook -i inventory.ini site.yml
```