forked from 5xRuby/daikichi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
47 lines (36 loc) · 800 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
39
40
41
42
43
44
45
46
FROM ruby:2.3-alpine
# Default Environment
ENV BUNDLE_PATH /usr/shared/bundle
ENV APP_HOME /usr/src/app
ENV RAILS_ENV production
# Application Home
RUN mkdir -p $APP_HOME
WORKDIR $APP_HOME
# Requirement
RUN apk add --no-cache \
tzdata \
build-base \
libev \
pkgconfig \
postgresql \
postgresql-dev \
postgresql-client \
bash \
nodejs \
git
# Setup Gems
ADD Gemfile $APP_HOME/Gemfile
ADD Gemfile.lock $APP_HOME/Gemfile.lock
# Install Dependency
#RUN cd $APP_HOME && \
# gem install puma && \
# bundle install --without development test --path $BUNDLE_PATH
# Add Application Source Code
ADD . $APP_HOME
ADD vendor/config/puma.rb /etc/puma.rb
# Volumes
VOLUME $APP_HOME
VOLUME $BUNDLE_PATH
EXPOSE 9292
ENTRYPOINT ["bin/entrypoint"]
CMD ["start"]