mirror of
https://github.com/manyfold3d/manyfold.git
synced 2026-10-23 12:12:21 -05:00
58 lines
1.3 KiB
Docker
58 lines
1.3 KiB
Docker
FROM ruby:3.3.1-alpine3.18 AS build
|
|
|
|
RUN apk add --no-cache \
|
|
tzdata \
|
|
s6-overlay \
|
|
alpine-sdk \
|
|
postgresql-dev \
|
|
nodejs \
|
|
yarn \
|
|
xz \
|
|
libarchive \
|
|
mesa-gl \
|
|
glfw
|
|
|
|
RUN gem install foreman
|
|
|
|
ARG APP_VERSION
|
|
ARG GIT_SHA
|
|
|
|
ENV PORT=3214
|
|
ENV RACK_ENV=production
|
|
ENV RAILS_ENV=production
|
|
ENV NODE_ENV=production
|
|
ENV RAILS_SERVE_STATIC_FILES=true
|
|
ENV APP_VERSION=${APP_VERSION}
|
|
ENV GIT_SHA=${GIT_SHA}
|
|
|
|
# PUID and PGID env vars - these control what user the app is run as inside
|
|
# the entrypoint script. Default to root for backwards compatibility with existing
|
|
# installations, but the admin will be warned if these aren't overridden with something
|
|
# else at runtime, and this default will be removed in future.
|
|
ENV PUID=0
|
|
ENV PGID=0
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
COPY package.json .
|
|
COPY yarn.lock .
|
|
RUN yarn config set network-timeout 600000 -g
|
|
RUN yarn install
|
|
|
|
RUN gem install bundler -v 2.4.13
|
|
RUN bundle config set --local deployment 'true'
|
|
RUN bundle config set --local without 'development test'
|
|
COPY .ruby-version .
|
|
COPY Gemfile* ./
|
|
RUN bundle install
|
|
|
|
COPY . .
|
|
RUN \
|
|
DATABASE_URL="nulldb://user:pass@localhost/db" \
|
|
SECRET_KEY_BASE="placeholder" \
|
|
bundle exec rake assets:precompile
|
|
|
|
EXPOSE 3214
|
|
ENTRYPOINT ["bin/docker-entrypoint.sh"]
|
|
CMD ["foreman", "start"]
|