Files
snibox-sqlite/Dockerfile
2021-03-17 17:47:01 +11:00

38 lines
847 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 c756dfffbf2cda8a33a66c2bc4d7da0584fcbcbe
ENV RAILS_SERVE_STATIC_FILES=true
ENV RAILS_ENV production
ENV RACK_ENV production
ENV NODE_ENV production
ENV SECRET_KEY_BASE="08898973823f6f1d121ce30fb8adc1c559dcfc08f358cfc0298e4aad81b8c9d798e8249e3a4b26c04255cf8b2d71eaf8eda865d173ae3fe6fb1a599d1b1fa260"
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; bundle exec rake assets:precompile
EXPOSE 3000
ENTRYPOINT ["/bin/bash"]
CMD ["/app/entrypoint.sh"]