fix: cannot precompile assets before copying rails content

Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
This commit is contained in:
Louis Vallat 2023-04-07 00:02:07 +02:00
parent b324436cf0
commit 57becfdb72
No known key found for this signature in database
GPG Key ID: 0C87282F76E61283

View File

@ -18,9 +18,8 @@ WORKDIR /count_anything
COPY Gemfile Gemfile.lock package.json yarn.lock ./ COPY Gemfile Gemfile.lock package.json yarn.lock ./
RUN bundle config set --local without 'development test' && \ RUN bundle config set --local without 'development test' && \
bundle install && \ bundle install && \
yarn install && \ yarn install
rails assets:precompile
COPY . . COPY . .
CMD /count_anything/bin/rails db:migrate && /count_anything/bin/rails server CMD /count_anything/bin/rails assets:precompile && /count_anything/bin/rails db:migrate && /count_anything/bin/rails server