From c80d2857cb2cdeac56044c7e3189109c1d1e2fc1 Mon Sep 17 00:00:00 2001 From: Louis Vallat Date: Thu, 6 Apr 2023 21:11:24 +0200 Subject: [PATCH] feat: move assets:precompile to docker preparation instead of at each runtimes Signed-off-by: Louis Vallat --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5de5d77..1508fc3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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