[openstreetmap/openstreetmap-website] Add Docker Compose Support for Development Environment (#2409)
Jamie Alessio
notifications at github.com
Mon Mar 2 03:32:41 UTC 2020
jalessio commented on this pull request.
> + ruby-dev \
+ yarn && \
+ apt-get clean && \
+ rm -rf /var/lib/apt/lists/*
+
+# Setup app location
+RUN mkdir -p /app
+WORKDIR /app
+
+# Install Ruby packages
+ADD Gemfile Gemfile.lock /app/
+RUN bundle install
+
+# Install NodeJS packages
+ADD package.json yarn.lock /app/
+RUN yarn
@gravitystorm I realize you've been consistently asking for using the `bundle exec` form of commands for consistency _(which I appreciate)_, but I'll try to convince you of this exception...
I toiled with getting this to work via `bundle exec rake db:migrate`, but I couldn't get it to run without adding a big chunk of the repository into the image during build. It ended up adding a bunch of extra files to the image *just* so that I could run `bundle exec rake db:migrate` instead `yarn` directly. I believe the result is the same in the end so I went with the simpler option.
That said, perhaps someone else could compile a small list of files necessary to successfully run `rake` commands during the image build?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/2409#pullrequestreview-366934343
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20200301/0ec01341/attachment.htm>
More information about the rails-dev
mailing list