feat: move assets:precompile to docker preparation instead of at each runtimes

Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
This commit is contained in:
Louis Vallat 2023-04-06 21:11:24 +02:00
parent 4db7b8f3b8
commit c80d2857cb
No known key found for this signature in database
GPG Key ID: 0C87282F76E61283

View File

@ -17,8 +17,9 @@ RUN apt-get update && \
WORKDIR /count_anything
COPY Gemfile Gemfile.lock package.json yarn.lock ./
RUN bundle install --without development test && \
yarn install
yarn install && \
rails assets:precompile
COPY . .
CMD /count_anything/bin/rails assets:precompile && /count_anything/bin/rails db:migrate && /count_anything/bin/rails server
CMD /count_anything/bin/rails db:migrate && /count_anything/bin/rails server