forked from sepans/exchange
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
38 lines (29 loc) · 798 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
35
36
37
38
FROM ruby:2.6.5-alpine3.10
ENV PORT 8080
EXPOSE 8080
WORKDIR /app
RUN apk --no-cache add \
build-base \
chromium \
chromium-chromedriver \
dumb-init \
git \
nodejs \
postgresql-dev \
tzdata \
bash # debugging and datadog events
# Set up deploy user, working directory and shared folders for Puma / Nginx
RUN mkdir /shared && \
mkdir /shared/config && \
mkdir /shared/pids && \
mkdir /shared/sockets
COPY .ruby-version Gemfile* ./
RUN gem install bundler && \
bundle install --frozen --jobs $(nproc)
COPY . ./
RUN adduser -D deploy && \
chown -R deploy:deploy /app && \
chown -R deploy:deploy /shared
USER deploy
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["bundle", "exec", "puma", "-C", "config/puma.config"]