Sha256: 83ed5433fcc34b8dd1fb974b3b7c3bec3df65bd7aa61f4e410cd83db0869561b

Contents?: true

Size: 1.06 KB

Versions: 1

Compression:

Stored size: 1.06 KB

Contents

FROM ruby:3.0-slim as cache

RUN apt-get update -qq && apt-get install -y \
curl \
build-essential \
libpq-dev \
postgresql-client
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -

RUN curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list

RUN apt-get update -qq && apt-get install -y yarn

WORKDIR /bookstore
COPY Gemfile /<%= app_name %>/Gemfile
COPY Gemfile.lock /<%= app_name %>/Gemfile.lock
COPY package.json /<%= app_name %>/package.json
COPY yarn.lock /<%= app_name %>/yarn.lock

RUN bundle install --without development
RUN yarn install

FROM cache
COPY . /bookstore

ARG DATABASE_HOST=db
ARG RAILS_ENV=production

ENV DATABASE_HOST=$DATABASE_HOST
ENV RAILS_ENV=$RAILS_ENV

ENV RAILS_LOG_TO_STDOUT=true
ENV RAILS_SERVE_STATIC_FILES=true

RUN bundle exec rails assets:precompile

COPY entrypoint.sh /usr/bin/
RUN chmod +x /usr/bin/entrypoint.sh
ENTRYPOINT ["entrypoint.sh"]

EXPOSE 3000

# Start the main process.
CMD ["rails", "server", "-b", "0.0.0.0"]

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
schienenzeppelin-0.1 templates/Dockerfile.erb