Skip to content

Commit

Permalink
Move yarn configuration into yarnrc (publiclab#3775)
Browse files Browse the repository at this point in the history
* Move yarn configuration into yarnrc

* Update project's yarn.lock file
  • Loading branch information
Radhikadua123 authored and jywarren committed Oct 26, 2018
1 parent e7adb1b commit 55fb685
Show file tree
Hide file tree
Showing 5 changed files with 1,049 additions and 34 deletions.
3 changes: 3 additions & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--install.modules-folder "./public/lib"
ignore-scripts true
ignore-engines true
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ RUN bundle install --jobs=4
ADD . /app
WORKDIR /app

RUN yarn --ignore-engines --ignore-scripts --modules-folder ./public/lib && yarn postinstall
RUN yarn install && yarn postinstall
RUN passenger-config compile-nginx-engine --connect-timeout 60 --idle-timeout 60
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ redeploy-container:
docker-compose down --remove-orphans
rm -f ./tmp/pids/server.pid
docker-compose up -d
docker-compose exec -T web yarn --ignore-engines --ignore-scripts --modules-folder public/lib
docker-compose exec -T web yarn install
docker-compose exec -T web bash -c "echo 172.19.0.1 smtp >> /etc/hosts"
docker-compose exec -T mailman bash -c "echo 172.19.0.1 smtp >> /etc/hosts"
docker-compose exec -T sidekiq bash -c "echo 172.19.0.1 smtp >> /etc/hosts"
Expand All @@ -21,7 +21,7 @@ deploy-container:
docker-compose run --rm web bash -c "sleep 5 && rake db:migrate && rake assets:precompile"
rm -f ./tmp/pids/server.pid
docker-compose up -d
docker-compose exec -T web yarn --ignore-engines --ignore-scripts --modules-folder public/lib
docker-compose exec -T web yarn install
docker-compose exec -T web bash -c "echo 172.19.0.1 smtp >> /etc/hosts"
docker-compose exec -T mailman bash -c "echo 172.19.0.1 smtp >> /etc/hosts"
docker-compose exec -T sidekiq bash -c "echo 172.19.0.1 smtp >> /etc/hosts"
Expand All @@ -32,7 +32,7 @@ test-container:
docker-compose up -d
docker-compose exec -T web rake db:setup
docker-compose exec -T web rake db:migrate
docker-compose exec -T web yarn --ignore-engines --ignore-scripts --modules-folder public/lib
docker-compose exec -T web yarn install
docker-compose exec -T web rake test:all
docker-compose exec -T web rails test -d
docker-compose down
Expand All @@ -41,7 +41,7 @@ install-dev:
echo "Installing RubyGems"
bundle install --without production mysql
echo "Installing yarn Packages"
yarn --ignore-engines --ignore-scripts --modules-folder public/lib
yarn install
echo "Copying example configuartions"
cp db/schema.rb.example db/schema.rb
cp config/database.yml.sqlite.example config/database.yml
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ For information on how to install for use with the cloud environment, please see
5. Make a copy of `db/schema.rb.example` and place it at `db/schema.rb`.
6. Make a copy of `config/database.yml.sqlite.example` and place it at `config/database.yml`
7. Run `rake db:setup` to set up the database
8. Install static assets (like external javascript libraries, fonts) with `yarn --ignore-engines --ignore-scripts --modules-folder ./public/lib`
8. Install static assets (like external javascript libraries, fonts) with `yarn install`
9. By default, start rails with `passenger start` from the Rails root and open http://localhost:3000 in a web browser.
(for local SSL work, see [SSL](#ssl+in+development) below)
10. Wheeeee! You're up and running! Log in with test usernames "user", "moderator", or "admin", and password "password".
Expand Down
Loading

0 comments on commit 55fb685

Please sign in to comment.