From bea117a4b6b674472658339fcf1692cc7868beb9 Mon Sep 17 00:00:00 2001 From: abcang Date: Thu, 4 May 2017 11:39:50 +0900 Subject: [PATCH] changed to run foreman with vagrant (#2742) * changed to run foreman with vagrant * change port specification method and database setting * delete changes of environment variable related code * hard coated the port --- Procfile.dev | 6 +++--- Vagrantfile | 20 +++++++++++--------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/Procfile.dev b/Procfile.dev index 35299f9345..87da7a7f48 100644 --- a/Procfile.dev +++ b/Procfile.dev @@ -1,3 +1,3 @@ -web: bundle exec puma -C config/puma.rb -stream: yarn run start -webpack: ./bin/webpack-dev-server +web: PORT=3000 bundle exec puma -C config/puma.rb +stream: PORT=4000 yarn run start +webpack: ./bin/webpack-dev-server --host 0.0.0.0 diff --git a/Vagrantfile b/Vagrantfile index eeab729047..b2ebbb83f7 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -38,7 +38,6 @@ sudo apt-get install \ -y # Install rvm -cd /vagrant read RUBY_VERSION < .ruby-version gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 curl -sSL https://get.rvm.io | bash -s stable --ruby=$RUBY_VERSION @@ -49,22 +48,23 @@ sudo -u postgres createuser -U postgres vagrant -s sudo -u postgres createdb -U postgres mastodon_development # Install gems and node modules -gem install bundler +gem install bundler foreman bundle install yarn install # Build Mastodon export $(cat ".env.vagrant" | xargs) bundle exec rails db:setup -bundle exec rails assets:precompile + +# Configure automatic loading of environment variable +echo 'export $(cat "/vagrant/.env.vagrant" | xargs)' >> ~/.bash_profile SCRIPT $start = <