Files
2026-10-21 09:21:26 +01:00

39 lines
690 B
Docker

## BUILD STAGE ##########################################
FROM base AS build
RUN apk add --no-cache \
alpine-sdk \
gcompat \
bzip2 \
gmp-dev \
libffi-dev \
procps \
yaml-dev \
zlib-dev \
nodejs=~24.18.1 \
npm \
postgresql-dev \
mariadb-dev \
libarchive
COPY package.json .
COPY yarn.lock .
RUN npm install --global corepack
RUN corepack enable yarn
RUN yarn install
COPY .ruby-version .
COPY Gemfile* ./
RUN bundle install
COPY . .
RUN touch db/schema.rb
RUN \
DATABASE_URL="nulldb://user:pass@localhost/db" \
SECRET_KEY_BASE="placeholder" \
RACK_ENV="production" \
RAILS_ASSETS_PRECOMPILE=1 \
bundle exec rake assets:precompile
RUN rm db/schema.rb