Skip to content

Commit

Permalink
#241 Split up installing new packages (apt-get, npm -g) from setting …
Browse files Browse the repository at this point in the history
…up a newly cloned repository.
  • Loading branch information
Wotuu committed Jun 13, 2020
1 parent da4ba2e commit 49901d9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
14 changes: 1 addition & 13 deletions init_new_server.sh
Expand Up @@ -5,8 +5,6 @@
# Create databases?
# Create users & permissions?

sudo apt-get install -y redis-server supervisor pngquant

# create directories
tput setaf 2;
echo "Creating directories..."
Expand Down Expand Up @@ -36,13 +34,6 @@ sudo apt-get install acl
# Give www-data user permission to write in this folder regardless of ownership. See https://stackoverflow.com/a/29882246/771270
setfacl -d -m g:www-data:rwx storage/logs

# Install composer, npm dependencies and then npm itself
apt-get install composer \
nodejs-dev \
node-gyp \
libssl1.0-dev \
npm

# Prior to performing any artisan commands, we need to update composer. Normally composer also calls artisan, but the
# --no-scripts tag prevents that from happening. After this, artisan will work normally. Otherwise you get this error:
# Fatal error: Uncaught Error: Class 'Illuminate\Foundation\Application' not found in /home/vagrant/Git/private/keystone.guru/bootstrap/app.php:14
Expand Down Expand Up @@ -116,11 +107,8 @@ rm -rf resources/views/layouts/headers
rm -rf resources/views/layouts/navbars
rm -rf resources/views/users

sudo npm install -g laravel-echo-server
sudo npm install -g handlebars

tput setaf 2;
echo "Seeding database..."
echo "Seeding Laratrust..."
tput sgr0;
# Seed Laratrust (initial users etc)
php artisan db:seed --class=LaratrustSeeder --database=migrate
Expand Down
12 changes: 12 additions & 0 deletions init_packages.sh
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

apt-get install -y redis-server \
supervisor \
pngquant \
composer \
nodejs-dev \
node-gyp \
libssl1.0-dev \
npm

npm install -g laravel-echo-server handlebars

0 comments on commit 49901d9

Please sign in to comment.