You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
flarum/scripts/environment.sh

45 lines
1.0 KiB

#! /bin/bash
su - vagrant
### Setup NPM globals and create necessary directories ###
sudo apt-get install -y phantomjs zsh exuberant-ctags
mkdir /home/vagrant/npm
mkdir -p /vagrant/flarum/core
sudo chown -R vagrant:vagrant /home/vagrant
cp /vagrant/scripts/aliases ~/.aliases
### Create rc file ###
if [ -e "/home/vagrant/.zshrc" ]
then
echo "source ~/.aliases" >> ~/.zshrc
else
echo "source ~/.aliases" >> ~/.bashrc
fi
### Set up environment files and database ###
cp /vagrant/.env.example /vagrant/.env
mysql -u root -proot -e 'create database flarum'
### Setup flarum/core ###
composer global require franzl/studio:dev-master
cd /vagrant/flarum/core
git clone https://github.com/flarum/core .
composer install --prefer-dist
10 years ago
mkdir public
cd /vagrant/flarum/core/ember/forum
npm install
bower install
cd /vagrant/flarum/core/ember/admin
npm install
bower install
### Install main project's dependencies
cd /vagrant
composer install --prefer-dist
### Prepare the database
php artisan flarum:install
php artisan flarum:seed