2018-05-27 01:18:11 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
if [[ "$COMMAND" = deploy-dev-travis ]]; then
|
|
|
|
exit 0 # no need to setup mastodon in this case
|
|
|
|
fi
|
|
|
|
|
2018-11-04 06:13:57 +01:00
|
|
|
# install ruby
|
2018-05-28 17:26:17 +02:00
|
|
|
source "$HOME/.rvm/scripts/rvm"
|
2018-06-08 00:26:47 +02:00
|
|
|
rvm install 2.5.1
|
|
|
|
rvm use 2.5.1
|
2018-05-28 17:26:17 +02:00
|
|
|
|
2018-11-05 17:58:26 +01:00
|
|
|
# fix for redis IPv6 issue
|
|
|
|
# https://travis-ci.community/t/trusty-environment-redis-server-not-starting-with-redis-tools-installed/650/2
|
|
|
|
sudo sed -e 's/^bind.*/bind 127.0.0.1/' /etc/redis/redis.conf > redis.conf
|
|
|
|
sudo mv redis.conf /etc/redis
|
|
|
|
sudo service redis-server start
|
|
|
|
echo PING | nc localhost 6379 # check redis running
|
2018-11-04 06:13:57 +01:00
|
|
|
|
|
|
|
# install ffmpeg from PPA because it's not in Trusty
|
2018-05-27 01:18:11 +02:00
|
|
|
sudo -E add-apt-repository -y ppa:mc3man/trusty-media
|
|
|
|
sudo -E apt-get update
|
|
|
|
sudo -E apt-get install -y ffmpeg
|
2018-11-04 06:13:57 +01:00
|
|
|
|
|
|
|
# check versions
|
2018-05-27 01:18:11 +02:00
|
|
|
ruby --version
|
|
|
|
node --version
|
|
|
|
npm --version
|
|
|
|
postgres --version
|
|
|
|
redis-server --version
|
|
|
|
ffmpeg -version
|