mirror of
https://github.com/manyfold3d/manyfold.git
synced 2026-10-21 11:12:27 -05:00
39 lines
690 B
Docker
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
|