Skip to content

Symlink ~/roundware-server to Apache code on production servers so manage.py works#210

Merged
hburgund merged 1 commit intoroundware:developfrom
13rac1:symlink-prod-code
Feb 3, 2015
Merged

Symlink ~/roundware-server to Apache code on production servers so manage.py works#210
hburgund merged 1 commit intoroundware:developfrom
13rac1:symlink-prod-code

Conversation

@13rac1
Copy link
Copy Markdown
Member

@13rac1 13rac1 commented Feb 3, 2015

@hburgund and I discovered an issue with the production server upgrade process. We couldn't get Django migrations to run while using the roundware user (Note: vagrant user is used on development VMs.) The issue was install.sh was making another copy of the codebase for the roundware user, but deploy.sh was never updating it. The solution is for ~/roundware-server to always be symbolic link. On dev VMs it goes to /vagrant and on production systems it goes to /var/www/roundware/source/. The roundware or vagrant user .profile always deferences the symbolic link to create the PYTHON_PATH environment variable.

Now the following will work on a production machine (so it acts the same as on dev):

sudo su - roundware
cd ~/roundware-server/roundware
./manage.py migrate

This commit fixes the issue for new installations. The following will "upgrade" existing production installs:

sudo rm -rf /home/roundware/roundware-server/
sudo ln -snf /var/www/roundware/source/ /home/roundware/roundware-server

hburgund added a commit that referenced this pull request Feb 3, 2015
Symlink ~/roundware-server to Apache code on production servers so manage.py works
@hburgund hburgund merged commit db3fe76 into roundware:develop Feb 3, 2015
@13rac1 13rac1 deleted the symlink-prod-code branch February 7, 2015 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants