Skip to content

Commit d8336fd

Browse files
author
David Zuckerman
committed
Moved yarn build
1 parent 69cf470 commit d8336fd

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ ENV NODE_PATH=/usr/local/yarn/node_modules
8888
# yet, so if the build fails before the `bundle install` step below, you
8989
# will need to override the default command when troubleshooting the buggy
9090
# image.
91-
CMD ["rails", "server", "-b", "0.0.0.0"]
91+
CMD ["bundle", "exec", "rails", "server", "-b", "0.0.0.0"]
9292

9393
# =============================================================================
9494
# Target: development
@@ -134,7 +134,7 @@ RUN bundle install
134134
# re-install.
135135
COPY --chown=$APP_USER:$APP_USER . .
136136

137-
RUN yarn install --cwd /usr/local/yarn
137+
RUN yarn install --cwd /usr/local/yarn
138138

139139
# =============================================================================
140140
# Target: production
@@ -169,8 +169,11 @@ RUN bundle install --local
169169

170170
# TODO: Figure out why jsbundling-rails doesn't invoke `yarn build`
171171
# *before* Sprockets reads app/assets/config/manifest.js
172-
RUN yarn install --cwd /usr/local/yarn
172+
#RUN yarn install --cwd /usr/local/yarn
173+
WORKDIR /usr/local/yarn
174+
RUN yarn build
173175

176+
WORKDIR /opt/app
174177
# Pre-compile assets so we don't have to do it after deployment.
175178
# NOTE: dummy SECRET_KEY_BASE to prevent spurious initializer issues
176179
# -- see https://github.com/rails/rails/issues/32947

0 commit comments

Comments
 (0)