Files
snibox-sqlite/Dockerfile
2019-01-16 23:27:55 +00:00

35 lines
634 B
Docker

FROM ruby:2.5-alpine
RUN apk add --no-cache \
git \
build-base \
tzdata \
nodejs \
yarn \
sqlite-dev \
bash \
postgresql-dev
WORKDIR /app
ARG GIT_HASH
ENV GIT_HASH ${GIT_HASH:-60445db1a79439f49f072fffc6edcf16142d3196}
ENV RAILS_ENV development
ENV RACK_ENV development
ENV NODE_ENV production
RUN git clone https://github.com/snibox/snibox.git /app && cd /app && git reset --hard $GIT_HASH
COPY . /app
RUN gem install bundler && bundle install
VOLUME /app/db/database
RUN bundle exec rake assets:precompile
EXPOSE 3000
CMD cd /app && rake 'db:migrate' && bundle exec rails server -b 0.0.0.0