forked from elovation/elovation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-web
43 lines (29 loc) · 980 Bytes
/
Dockerfile-web
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
35
36
37
38
39
40
41
42
FROM ruby:2.4.0
RUN apt-get update \
&& apt-get -y install curl \
&& curl -sL https://deb.nodesource.com/setup_8.x | bash
RUN apt-get install -y --no-install-recommends \
postgresql-client \
&& apt-get install -y build-essential patch libpq-dev ruby-dev nodejs zlib1g-dev liblzma-dev \
&& rm -rf /var/lib/apt/lists/*
RUN gem update --system
RUN gem install bundler foreman
RUN mkdir /var/elovation
RUN mkdir /var/elovation/public
RUN mkdir /var/elovation/public/assets
COPY Gemfile /var/elovation/
COPY Gemfile.lock /var/elovation/
RUN mkdir -p /var/bundle
# Add application source
WORKDIR /var/elovation
ADD . /var/elovation
ADD config/database.yml.docker /var/elovation/config/database.yml
COPY ./web-entrypoint.sh /
RUN ["chmod", "+x", "/web-entrypoint.sh"]
RUN npm install yarn -g
ENV RAILS_ENV production
ENV RAILS_LOG_TO_STDOUT yes
ENV RAILS_SERVE_STATIC_FILES yes
EXPOSE 5000
ENTRYPOINT ["/web-entrypoint.sh"]
CMD ["foreman", "start"]