- Ubuntu 16.04 at least to run in vagrant-lxc
- In macos it should work with vagrant+virtualbox
sudo apt-get install vagrant
# use your fork and then request a pull if you plan to contribute
git clone [email protected]:cualbondi/cualbondi.com.ar.git
sudo apt-get install vagrant dpkg-dev zlib1g-dev
# maybe read this, not always needed https://github.com/rubygems/rubygems/commit/044b0e2685e4b219b013f1067d670918a48c1f62#commitcomment-14935888
sudo vagrant plugin install vagrant-lxc
vagrant lxc sudoers # put sudo pass and then
vagrant up --provider=lxc
If the last command does not work (trying lxc, some error with sudo something) go to
cd ~/.vagrant.d/gems/gems/
rm -rf vagrant-lxc-1.2.1
git clone [email protected]:fgrehm/vagrant-lxc.git vagrant-lxc-1.2.1
cd -
# and now try again
vagrant up --provider=lxc
vagrant up
Now you can go to http://192.168.2.100:80/ in the browser and enjoy cualbondi.
To access django's admin interface go to http://192.168.2.100/admin/ and login with user admin
pass admin
All this works inside vagrant machine
-
Vagrant mounts the directory in which the Vagrantfile is located outside vagrant machine (git root), inside the vagrant virtual machine to be accesed as
/repo
. -
Inside vagrant machine, uwsgi uses
/app/repo
to work, and communicates to nginx through a unix socket located in/run/uwsgi/app/django/socket
-
Inside vagrant machine, NginX acts as a reverse proxy for uwsgi, exposing application into port 80
-
Vagrant NATs port 80 inside vm to 8000 outside in localhost and creates a bridged network with ip 192.168.2.100 to communicate directly with the host
Change files in repo outside vagrant machine.
Then do vagrant ssh -c 'sudo service uwsgi restart'
to autoreload all *.py
files
To make uwsgi to autoreload django app on *.py
files modifications, enter the vagrant machine and uncomment line which says py-autoreload=2
in file /etc/uwsgi/apps-enabled/django.ini
Do F5 in localhost:8000
To use manage.py
, enter vagrant machine doing vagrant ssh
and execute manage.py
like this /app/env/bin/python /app/repo/manage.py
This is not open to public, we are working on an alternative to have data to play. We want to release all data, but we need to make sure we don't release sensible things like real users emails.
You can download a copy of production database running vagrant ssh -c 'source /app/repo/pulldb.sh <user>'
(<user>
being a linux user from cualbondi main server)
The same as dev install can be done, but changing the settings.py or adding a settings_local.py which overrides settings
Cualbondi software is distributed under GNU AGPLv3. See LICENSE file on directory root.
- Julian Perelli
- Martin Zugnoni