forked from auth0/nginx-jwt
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathprovision-vagrant.sh
33 lines (26 loc) · 955 Bytes
/
provision-vagrant.sh
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
#!/usr/bin/env bash
if [ -e "/etc/vagrant-provisioned" ];
then
echo "Vagrant provisioning already completed. Skipping..."
exit 0
else
echo "Starting Vagrant provisioning process..."
fi
host='nginx-jwt'
# Change the hostname so we can easily identify what environment we're on:
echo $host > /etc/hostname
# Update /etc/hosts to match new hostname to avoid "Unable to resolve hostname" issue:
echo '127.0.0.1 $host' >> /etc/hosts
# Use hostname command so that the new hostname takes effect immediately without a restart:
hostname $host
# Install core components
apt-get update
apt-get install -y make g++ curl git vim nfs-common portmap build-essential libssl-dev
# Install Node.js
curl --silent --location https://deb.nodesource.com/setup_0.12 | sudo bash -
apt-get install --yes nodejs
# Install Docker
curl -sSL https://get.docker.com/ubuntu | sh
# Vim settings:
echo 'syntax on' > /home/vagrant/.vimrc
touch /etc/vagrant-provisioned