2023-04-06 20:58:58 +02:00
|
|
|
# syntax=docker/dockerfile:1
|
|
|
|
FROM ruby:3.2.2
|
|
|
|
|
|
|
|
ENV RAILS_ENV=production
|
|
|
|
ENV RAILS_SERVE_STATIC_FILES=yes
|
|
|
|
ENV RAILS_LOG_TO_STDOUT=yes
|
|
|
|
EXPOSE 3000
|
|
|
|
|
|
|
|
RUN apt-get update && \
|
|
|
|
curl -fsSL https://deb.nodesource.com/setup_19.x | bash - && \
|
|
|
|
apt-get install -y sqlite3 neovim curl nodejs --no-install-recommends && \
|
|
|
|
apt-get clean && \
|
|
|
|
bundle config --global frozen 1 && \
|
|
|
|
npm install --global yarn
|
|
|
|
|
|
|
|
|
|
|
|
WORKDIR /count_anything
|
|
|
|
COPY Gemfile Gemfile.lock package.json yarn.lock ./
|
2023-04-06 21:16:13 +02:00
|
|
|
RUN bundle config set --local without 'development test' && \
|
|
|
|
bundle install && \
|
2023-04-07 00:02:07 +02:00
|
|
|
yarn install
|
2023-04-06 20:58:58 +02:00
|
|
|
|
|
|
|
COPY . .
|
|
|
|
|
2023-04-07 00:02:07 +02:00
|
|
|
CMD /count_anything/bin/rails assets:precompile && /count_anything/bin/rails db:migrate && /count_anything/bin/rails server
|