-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (18 loc) · 766 Bytes
/
Dockerfile
File metadata and controls
27 lines (18 loc) · 766 Bytes
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
FROM ruby:alpine
MAINTAINER Igor Petrov <garik.piton@gmail.com>
ENV INSTALL_PATH /kms
# Set Rails to run in production
ENV RAILS_ENV production
RUN apk update && apk --update --no-cache add libstdc++ postgresql-client tzdata && mkdir $INSTALL_PATH
WORKDIR $INSTALL_PATH
COPY Gemfile Gemfile
RUN apk --update --no-cache add --virtual build-deps build-base python postgresql-dev nodejs g++; \
bundle install --without development test && apk del build-deps
COPY . .
EXPOSE 3000
# Expose a volume so that nginx will be able to read in assets in production.
VOLUME ["$INSTALL_PATH/public"]
# Configure an entry point, so we don't need to specify
# "bundle exec" for each of our commands.
ENTRYPOINT ["bundle", "exec"]
CMD ["rails", "server", "-b", "0.0.0.0"]