Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save phillcoxon/27d27a4a64e82a2dbb7edf942628cbdc to your computer and use it in GitHub Desktop.
Save phillcoxon/27d27a4a64e82a2dbb7edf942628cbdc to your computer and use it in GitHub Desktop.
Enable Wordmove with "Local by Flywheel".
#!/usr/bin/env bash
set -xu
RUBY_VERSION=2.4.1
LIBSSL_VERSION=$(dpkg -s libssl1.0.0 | grep -i ^version | awk '{print $2;}')
apt-get update -y
apt-get upgrade -y
apt-get install -y git ssh-pass
apt-get install -y software-properties-common python-software-properties vim build-essential git python-setuptools ruby-build libssl-dev=${LIBSSL_VERSION}
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
cd ~/.rbenv && src/configure && make -C src
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
rbenv install --verbose ${RUBY_VERSION}
rbenv global ${RUBY_VERSION}
export RBENV_VERSION=${RUBY_VERSION}
gem install wordmove
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
wp cli update
cd /app/public
#wordmove init
#ln -s /app/public/Movefile /Movefile
#cd /
kill -9 $(pidof /bin/bash)
@phillcoxon
Copy link
Author

phillcoxon commented Jun 5, 2017

How to use in a brand new Local instance

apt-get update && apt-get install -y curl && curl -Lk https://goo.gl/HAxii5 | sh

@phillcoxon
Copy link
Author

phillcoxon commented Jun 5, 2017

Note - takes an immensely long time to install ruby due to compiling in background. Adding --verbose to the install so at least we know something is happening.

Timed the install: 19m43.023s. Ugh.

@phillcoxon
Copy link
Author

Note: we may need to log out of Local by Flywheel SSH and log back in to get the latest version of Ruby so we can install wordmove.

If I'm smart I'll save a new install as a Local blueprint so I don't have to do the install every time.

Sigh. As much as I like WordMove it's a pain having to install 250Mb of binaries in every Local instance.

@ryanfurtner
Copy link

ryanfurtner commented Feb 19, 2018

Hey @phillcoxon,

Im trying to set up the same environment that youve been working on. If I run your script though, I get these messages after:

mysql-community-server : Depends: mysql-client (= 5.6.37-1debian8)
mysql-server : Depends: mysql-community-server (= 5.6.39-1debian8)

This happens every time I run your script, and these messages come up when I try to apt-get install anything. If you could shed any light on it, it would be MUCH appreciated.

Cheers.

@aromarious
Copy link

aromarious commented Feb 26, 2019

Hi @phillcoxon !

Thanks for your code and comments that is helpful for me.
I'd like to inform you my try and its result.

Tried to make a Local blurprint of this setting, it doesn't contain these tools.
I use 'Clone' instead of a blueprint to adding new site. It works well.

In this page, they say that "Blueprint packages up common themes and plugins."
https://getflywheel.com/why-flywheel/blueprints/
So that blueprint does not contain these tools.

I hope this information helpful.
Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment