Skip to content
Snippets Groups Projects
Commit e3f31424 authored by Todd Dembrey's avatar Todd Dembrey
Browse files

Update the settings to get the vagrant box to run correctly

parent 1b554ecb
No related branches found
No related tags found
No related merge requests found
......@@ -20,7 +20,7 @@ To set up a new build:
``` bash
git clone git@github.com:OpenTechFund/opentech.fund.git
cd opentech
cd opentech.fund
vagrant up
vagrant ssh
```
......
......@@ -78,7 +78,7 @@ Vagrant.configure(2) do |config|
# sudo apt-get update
# sudo apt-get install -y apache2
# SHELL
config.vm.provision :shell, :path => "vagrant/provision.sh", :args => "opentech"
config.vm.provision :shell, :path => "vagrant/provision.sh", :args => ["opentech.fund", "opentech"]
# Enable agent forwarding over SSH connections.
config.ssh.forward_agent = true
......
#!/bin/bash
PROJECT_NAME=$1
MODULE_NAME=$2
PROJECT_DIR=/vagrant
VIRTUALENV_DIR=/home/vagrant/.virtualenvs/$PROJECT_NAME
......@@ -10,8 +11,8 @@ PIP=$VIRTUALENV_DIR/bin/pip
# Create database
su - vagrant -c "createdb $PROJECT_NAME"
su - vagrant -c "createdb $MODULE_NAME"
# Virtualenv setup for project
su - vagrant -c "virtualenv --python=python3 $VIRTUALENV_DIR"
......@@ -40,7 +41,7 @@ chmod a+x $PROJECT_DIR/manage.py
# Add a couple of aliases to manage.py into .bashrc
cat << EOF >> /home/vagrant/.bashrc
export PYTHONPATH=$PROJECT_DIR
export DJANGO_SETTINGS_MODULE=$PROJECT_NAME.settings.dev
export DJANGO_SETTINGS_MODULE=$MODULE_NAME.settings.dev
alias dj="django-admin.py"
alias djrun="dj runserver 0.0.0.0:8000"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment