Files
snibox-sqlite/Dockerfile
2019-06-10 23:43:13 +00:00

34 lines
655 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 51194c1cd3eaf179d9434236a1f64b39b6008de5
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 echo "gem 'sqlite3', '~> 1.3.6'" >> Gemfile && 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