forked from reddit-archive/reddit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
186 lines (165 loc) · 6.62 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
# -*- mode: ruby -*-
# vi: set ft=ruby :
# This assumes that the host machine has r2 and all the reddit plugins checked
# out and in the correct directories--pay attention to both name and position
# relative to the r2 code:
#
# r2: {ROOTDIR}/reddit
#
# plugins:
# about: {ROOTDIR}/about
# gold: {ROOTDIR}/gold
#
# All plugins are optional. A plugin will only be installed if it is listed
# in `plugins` AND it is located in a directory that both follows the plugin
# naming convention and is correctly located on the host machine. The general
# rule for naming each plugin directory is that "reddit-plugin-NAME" should be
# in the directory {ROOTDIR}/NAME.
#
# This VagrantFile allows for the creation of two VMs:
# * default: the primary VM, with all services necessary to run reddit
# locally against the local codebase.
# * travis: Testing-only VM suitable for running `nosetests` and debugging
# issues encountered without having to wait for travis-ci to pick
# up the build. This will *not* be the same environment as
# travis, but it should be useful for repairing broken tests.
#
# To start your vagrant box simply enter `vagrant up` from {ROOTDIR}/reddit.
# You can then ssh into it with `vagrant ssh`.
#
# avahi-daemon is installed on the guest VM so you can access your local install
# at https://reddit.local. If that fails you'll need to update your host
# machine's hosts file (/etc/hosts) to include the line:
# 192.168.56.111 reddit.local
#
# If you want to create additional vagrant boxes you can copy this file
# elsewhere, but be sure to update `code_share_host_path` to be the absolute
# path to {ROOTDIR}.
vagrant_user = "vagrant"
# code directories
this_path = File.absolute_path(__FILE__)
reddit_dir = File.expand_path("..", this_path)
code_share_host_path = File.expand_path("..", reddit_dir)
code_share_guest_path = "/media/re