From 47e475e65bd21359223e53ee161a5212b9fd1afc Mon Sep 17 00:00:00 2001 From: Rene Date: Thu, 18 Sep 2025 21:45:22 +0200 Subject: [PATCH] test --- Dockerfile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 03dfbcd..a86e938 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,20 +9,24 @@ RUN apt-get update -qq && \ useradd --user-group --create-home --shell /bin/false app ENV HOME=/home/app +# After setting WORKDIR and USER app WORKDIR $HOME/wedding USER app -# Copy only Gemfiles first for caching +# Copy Gemfiles and install Ruby deps COPY --chown=app:app Gemfile Gemfile.lock ./ RUN bundle install # Copy the rest of the app COPY --chown=app:app . ./ -# Run bundle again in case new gems are required (because of conditional Gemfile logic) -RUN bundle install +# Ensure node_modules directory is owned by app +RUN mkdir -p node_modules && chmod -R 755 node_modules -# Compile assets (SCSS -> CSS) +# Install JS deps before assets:precompile +RUN yarn install --check-files + +# Compile assets RUN bundle exec rake assets:precompile CMD ["bundle", "exec", "rails", "server", "-b", "0.0.0.0"]