forked from zooniverse/messenger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
34 lines (22 loc) · 703 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
FROM ruby:2.4.1
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y locales
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
ARG RAILS_ENV
WORKDIR /rails_app
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y supervisor libpq-dev python-dev && \
apt-get clean
COPY ./Gemfile /rails_app/
COPY ./Gemfile.lock /rails_app/
RUN cd /rails_app && \
bundle install --without test development
COPY ./ /rails_app
RUN (cd /rails_app && git log --format="%H" -n 1 > revision.txt)
COPY docker/supervisor.conf /etc/supervisor/conf.d/messenger.conf
ENV RAILS_ENV $RAILS_ENV
ENV RACK_ENV $RAILS_ENV
EXPOSE 81
ENTRYPOINT /usr/bin/supervisord