test
Some checks failed
CI / build (push) Has been cancelled

This commit is contained in:
2025-09-18 21:45:22 +02:00
parent d72d5fb898
commit 47e475e65b

View File

@ -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"]