-
Notifications
You must be signed in to change notification settings - Fork 66
/
Copy pathVagrantfile
33 lines (27 loc) · 1.26 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# -*- mode: ruby -*-
# vi: set ft=ruby :
TIMTEC_USER = "vagrant"
$runserver = <<SCRIPT
# must run with vagrant user
# cd /vagrant
cd /home/vagrant/timtec
~/env/bin/python manage.py migrate
tmux -2 new-session -d -s vagrant -n 'django'
tmux send-keys "/home/vagrant/env/bin/python manage.py runserver 0.0.0.0:8000" C-m
SCRIPT
Vagrant.configure('2') do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provision :shell, path: "scripts/bootstrap-ubuntu.sh", privileged: false, keep_color: true
# config.vm.provision :shell, path: "scripts/production-ubuntu.sh", privileged: false, keep_color: true
config.vm.provision "shell",
inline: $runserver,
privileged: false,
run: "always"
config.vm.network "forwarded_port", guest: 8000, host: 8000
config.ssh.username = TIMTEC_USER
config.vm.synced_folder "./", "/home/" + TIMTEC_USER + "/timtec/", create: true
# Uncomment following line if your are developing paralapraca theme or django-discussion app.
# Set paths according to your needs.
# config.vm.synced_folder "../django-discussion/", "/home/" + TIMTEC_USER + "/django-discussion/", create: true
# config.vm.synced_folder "../paralapraca/", "/home/" + TIMTEC_USER + "/paralapraca/", create: true
end