Skip to content

Commit b740b44

Browse files
committed
feat(ngrok): install ngrok for vagrant by default (via @Sgoettschkes)
1 parent 1a32075 commit b740b44

File tree

2 files changed

+30
-8
lines changed

2 files changed

+30
-8
lines changed

ngrok.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
json_resolver_url: ""
2+
dns_resolver_ips: []
3+
web_addr: 0.0.0.0:4040

provision.sh

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,30 @@ clojure () {
1414
chown vagrant:vagrant /home/vagrant/bin/lein
1515
}
1616

17+
heroku () {
18+
# Install Heroku CLI
19+
apt-get install software-properties-common -y # debian only
20+
add-apt-repository "deb https://cli-assets.heroku.com/branches/stable/apt ./"
21+
curl -L https://cli-assets.heroku.com/apt/release.key | apt-key add -
22+
apt-get update
23+
apt-get install heroku -y
24+
}
25+
26+
ngrok () {
27+
# Install ngrok
28+
wget -q -O /home/vagrant/ngrok.zip https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
29+
unzip /home/vagrant/ngrok.zip
30+
mv /home/vagrant/ngrok /home/vagrant/bin/ngrok
31+
chmod a+x /home/vagrant/bin/ngrok
32+
chown vagrant:vagrant /home/vagrant/bin/ngrok
33+
rm /home/vagrant/ngrok.zip
34+
35+
mkdir -p /home/vagrant/.ngrok2
36+
cp -f ${BasePath}/ngrok.yml /home/vagrant/.ngrok2/
37+
chmod -R a+x /home/vagrant/.ngrok2
38+
chown -R vagrant:vagrant /home/vagrant/.ngrok2
39+
}
40+
1741
main () {
1842
echo "PROVISIONING"
1943

@@ -24,15 +48,8 @@ main () {
2448
apt-get autoclean
2549
apt-get autoremove -y
2650

27-
# Install Heroku CLI
28-
apt-get install software-properties-common -y # debian only
29-
add-apt-repository "deb https://cli-assets.heroku.com/branches/stable/apt ./"
30-
curl -L https://cli-assets.heroku.com/apt/release.key | apt-key add -
31-
apt-get update
32-
apt-get install heroku -y
33-
3451
# Install some base software
35-
apt-get install -y curl vim
52+
apt-get install -y curl vim unzip
3653

3754
# Create bin dir for user vagrant
3855
mkdir -p /home/vagrant/bin
@@ -47,5 +64,7 @@ main () {
4764
echo "Hello 💧 Lemming :)" > /etc/motd
4865

4966
clojure
67+
heroku
68+
ngrok
5069
}
5170
main

0 commit comments

Comments
 (0)