2015-09-10 12:19:21 +02:00
|
|
|
#!/usr/bin/env bash
|
2015-05-22 05:43:44 +02:00
|
|
|
|
2021-01-02 07:29:36 +01:00
|
|
|
# Homestead v10 defaults the "php" command to PHP 7.4. Pony.fm needs 7.0.
|
|
|
|
sudo ln -sf /usr/bin/php7.0 /usr/bin/php
|
2016-01-07 19:16:37 +01:00
|
|
|
|
|
|
|
if type java &>/dev/null; then
|
|
|
|
echo "Java is installed!"
|
|
|
|
else
|
2021-01-02 07:29:36 +01:00
|
|
|
#sudo apt-get install -y wget apt-transport-https gnupg
|
|
|
|
wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | sudo apt-key add -
|
|
|
|
echo "deb https://adoptopenjdk.jfrog.io/adoptopenjdk/deb focal main" | sudo tee /etc/apt/sources.list.d/adoptopenjdk.list
|
|
|
|
|
2016-01-07 19:16:37 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if type /usr/share/elasticsearch/bin/elasticsearch &>/dev/null; then
|
|
|
|
echo "ElasticSearch is installed!"
|
|
|
|
else
|
|
|
|
wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
|
2021-01-02 07:29:36 +01:00
|
|
|
echo "deb http://packages.elastic.co/elasticsearch/2.x/debian stable main" | sudo tee /etc/apt/sources.list.d/elasticsearch-2.x.list
|
2016-01-07 19:16:37 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
2015-09-10 12:19:21 +02:00
|
|
|
echo "Running apt-get update..."
|
2021-01-02 07:29:36 +01:00
|
|
|
sudo apt-get update
|
2015-05-22 05:43:44 +02:00
|
|
|
|
2016-01-07 19:16:37 +01:00
|
|
|
echo "Installing tagging tools & other dependencies..."
|
2021-01-02 07:29:36 +01:00
|
|
|
sudo apt-get install -y elasticsearch
|
|
|
|
sudo apt-get install -y atomicparsley flac vorbis-tools imagemagick adoptopenjdk-8-openj9 pkg-config yasm libfaac-dev libmp3lame-dev libvorbis-dev libtheora-dev
|
2015-05-22 05:43:44 +02:00
|
|
|
|
2016-06-12 02:12:11 +02:00
|
|
|
echo "Installing PHP extensions"
|
2021-01-02 07:29:36 +01:00
|
|
|
sudo apt-get install -y libgmp-dev php-gmp php7.0-gmp
|
2016-06-12 02:12:11 +02:00
|
|
|
|
2016-07-17 22:34:40 +02:00
|
|
|
echo "Installing Postgres migration tool"
|
2021-01-02 07:29:36 +01:00
|
|
|
sudo apt-get install -y pgloader
|
2015-05-22 05:43:44 +02:00
|
|
|
|
|
|
|
if type ffmpeg &>/dev/null; then
|
2015-10-25 03:35:37 +01:00
|
|
|
echo "ffmpeg is installed!"
|
2015-05-22 05:43:44 +02:00
|
|
|
else
|
2021-01-02 07:29:36 +01:00
|
|
|
echo "ffmpeg is not installed; downloading..."
|
2015-10-25 03:35:37 +01:00
|
|
|
cd /tmp
|
2021-01-02 07:29:36 +01:00
|
|
|
wget -q "https://ffmpeg.org/releases/ffmpeg-2.6.3.tar.bz2"
|
|
|
|
echo "Finished downloading ffmpeg; now compiling it..."
|
2015-10-25 03:35:37 +01:00
|
|
|
tar -xjf "ffmpeg-2.6.3.tar.bz2"
|
|
|
|
cd "ffmpeg-2.6.3"
|
2021-01-02 07:29:36 +01:00
|
|
|
sudo ./configure --enable-gpl --enable-encoder=flac --enable-encoder=alac --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libfaac --enable-nonfree
|
|
|
|
sudo make -j4
|
2015-10-25 03:35:37 +01:00
|
|
|
sudo make install
|
2015-05-22 05:43:44 +02:00
|
|
|
fi
|
2015-04-30 09:23:14 +02:00
|
|
|
|
2015-09-13 04:19:45 +02:00
|
|
|
mkdir -p /vagrant/storage/logs/system
|
2015-04-12 03:22:15 +02:00
|
|
|
/vagrant/vagrant/copy-and-restart-configs.sh
|
|
|
|
|
|
|
|
cd /vagrant
|
|
|
|
|
2016-01-04 05:11:45 +01:00
|
|
|
/usr/local/bin/composer self-update
|
|
|
|
/usr/local/bin/composer install
|
2015-04-12 03:22:15 +02:00
|
|
|
|
2015-11-24 04:07:24 +01:00
|
|
|
cp -n "/vagrant/resources/environments/.env.local" "/vagrant/.env"
|
2015-04-12 03:22:15 +02:00
|
|
|
|
|
|
|
php artisan migrate
|
2015-05-22 05:43:44 +02:00
|
|
|
php artisan db:seed
|
2015-09-24 19:43:12 +02:00
|
|
|
|
2015-12-06 03:41:12 +01:00
|
|
|
echo ""
|
|
|
|
echo "+-----------------------------------------------+"
|
|
|
|
echo "| Now - if you haven't already, SSH into the VM |"
|
|
|
|
echo "| and run \`php artisan poni:setup\`! |"
|
|
|
|
echo "| See the README for more details. |"
|
|
|
|
echo "+-----------------------------------------------+"
|