Files
snibox-sqlite/Dockerfile
2019-07-09 13:00:10 +10:00

36 lines
718 B
Docker

FROM ruby:2.6-alpine
RUN apk add --no-cache \
git \
build-base \
tzdata \
nodejs \
yarn \
sqlite-dev \
bash \
postgresql-dev
WORKDIR /app
ENV GIT_HASH 78525f7281534674e5a987db805c2805f477b7f4
ENV RAILS_SERVE_STATIC_FILES=true
ENV RAILS_ENV production
ENV RACK_ENV production
ENV NODE_ENV production
RUN git clone https://github.com/snibox/snibox.git /app && cd /app && git reset --hard $GIT_HASH
COPY . /app
RUN echo "gem 'sqlite3', '~> 1.3.6'" >> Gemfile && gem install bundler && bundle install
VOLUME /app/db/database
RUN yarn install --check-files
RUN bundle exec rake assets:precompile
EXPOSE 3000
CMD cd /app && rake 'db:migrate' && bundle exec rails server -b 0.0.0.0