-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Yarn transition work-in-progress #2659
Changes from 54 commits
25ae2ed
18f42e5
64c463d
47fced2
f1b7a92
b390087
01ab043
353b074
c15932e
37f24c4
2c7108b
93a7494
17918ae
94a95dd
00917d6
0ac1dc7
1e6e36c
f2f1151
7a90143
fb381d1
30be568
6de563b
35577cd
f44c68b
4ed6613
03a28d2
41fc9fe
f99caa5
cd08f5b
e54d009
5d629b6
e16ffbf
8607ea7
671a6f1
ba6aca2
ba007c6
313d6cb
bceea75
cd4c8e2
de14b18
de71afb
5a7602c
69722e8
29cc932
928efff
84368f7
3092675
518c3ba
6964414
9f76aaf
ca760cf
b1da7d3
bb0c15b
b493d8e
903c330
d6cd975
e311651
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,16 +20,21 @@ ENV PHANTOMJS_VERSION 2.1.1 | |
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - | ||
RUN apt-get update -qq && apt-get install -y build-essential bundler libmariadbclient-dev ruby-rmagick libfreeimage3 wget curl procps cron make nodejs | ||
RUN wget https://github.com/Medium/phantomjs/releases/download/v$PHANTOMJS_VERSION/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -O /tmp/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2; tar -xvf /tmp/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -C /opt ; cp /opt/phantomjs-$PHANTOMJS_VERSION-linux-x86_64/bin/* /usr/local/bin/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @icarito would you replace this line with |
||
RUN npm install -g bower | ||
|
||
# Install yarn | ||
RUN npm config set strict-ssl false | ||
RUN npm install -g yarn | ||
|
||
RUN rm -r /usr/local/bundle | ||
|
||
# Install bundle of gems | ||
WORKDIR /tmp | ||
ADD Gemfile /tmp/Gemfile | ||
ADD Gemfile.lock /tmp/Gemfile.lock | ||
RUN bundle install --jobs 4 | ||
RUN bundle install --jobs=4 | ||
|
||
ADD . /app | ||
WORKDIR /app | ||
|
||
RUN bower install --allow-root | ||
RUN yarn --ignore-engines --ignore-scripts --modules-folder ./public/lib && yarn postinstall | ||
RUN passenger-config compile-nginx-engine --connect-timeout 60 --idle-timeout 60 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,13 +7,12 @@ build: | |
redeploy-container: | ||
docker-compose build --pull | ||
docker-compose exec web rake db:migrate | ||
docker-compose exec web bower install --allow-root | ||
docker-compose exec web bower update --allow-root | ||
docker-compose exec web rake assets:precompile | ||
docker-compose exec web rake tmp:cache:clear | ||
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You've removed the javascript package installation from line 10/11 and put it into line 15. This effectively waits until after rebooting the Rails app to get going with Javascript installation. So if Javascript installation fails, you've already restarted the app possibly broken by missing Javascript dependencies. If you move this line to line 10, then if yarn fails the app is still running fine and no harm was done. If you agree please do so! Thanks! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok I will move the yarn installation command to line 11. Thanks |
||
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" | ||
|
@@ -23,11 +22,10 @@ redeploy-container: | |
deploy-container: | ||
docker-compose run web sleep 5 | ||
docker-compose run web rake db:migrate | ||
docker-compose run web bower install --allow-root | ||
docker-compose run web bower update --allow-root | ||
docker-compose run web 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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again here, you wait till after deploying the container to install Javascript packages, I think the same applies here. Thanks! |
||
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" | ||
|
@@ -38,15 +36,16 @@ 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 rake test:all | ||
docker-compose exec -T web rails test -d | ||
docker-compose down | ||
|
||
install-dev: | ||
echo "Installing RubyGems" | ||
bundle install --without production mysql | ||
echo "Installing Bower Packages" | ||
bower install | ||
echo "Installing yarn Packages" | ||
yarn --ignore-engines --ignore-scripts --modules-folder public/lib | ||
echo "Copying example configuartions" | ||
cp db/schema.rb.example db/schema.rb | ||
cp config/database.yml.sqlite.example config/database.yml | ||
|
@@ -55,8 +54,6 @@ install-dev: | |
|
||
setup-complete: | ||
echo "Installing Ruby" | ||
rvm install ruby-2.1.2 | ||
rvm install ruby-2.4.4 | ||
echo "Installing Bundler" | ||
gem install bundler | ||
echo "Installing Bower" | ||
yarn global add bower |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove these comments unless they help somehow!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I wiil remove these