Simpstack

by djburkhart
1 deployments · 1 still active · last rev. 9 days ago

Compatible with: Ubuntu 17.10
						#!/bin/bash

# Set hostname
echo $HOSTNAME > /etc/hostname
hostname -F /etc/hostname

# Install NodeJS
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
sudo apt-get update
sudo apt-get install -y nodejs

# Install Yarn
curl -o- -L https://yarnpkg.com/install.sh | bash

#Setup Git
sudo apt-get update
sudo apt-get install git
git config --global user.name "Admin"
git config --global user.email "admin@$hostname"

git clone https://github.com/djburkhart/simpstack.git /home

cd /home
yarn install
yarn start
yarn dev:wds

# Lets Encrypt
sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install certbot

sudo certbot certonly

# Set $IPADDR
IPADDR=$(/sbin/ifconfig eth0 | awk '/inet / { print $2 }' | sed 's/addr://')

sudo certbot certonly --webroot -w /home -d $hostname
sudo certbot certonly --standalone -d $hostname