-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
26 lines (22 loc) · 910 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
# Base image:
FROM ruby:2.3.1
MAINTAINER kill5038([email protected])
# Install dependencies
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
# Set an environment variable where the Rails app is installed to inside of Docker image:
RUN mkdir -p /killman
# Set working directory, where the commands will be ran:
WORKDIR /killman
# Gems:
COPY Gemfile /killman/Gemfile
COPY Gemfile.lock /killman/Gemfile.lock
RUN gem install bundler
RUN bundle install --jobs 20 --retry 5 --without development test
ENV RAILS_ENV production
ENV RACK_ENV production
ENV DATABASE_URL mysql2://kill5038:[email protected]:3306/gill_man?pool=5&timeout=5000&encoding=utf8
ENV SECRET_KEY_BASE wpqkfehlfkwpqkfassaddasfat2523k5jh2jk24jl52
COPY . /killman
RUN bundle exec rake assets:precompile
EXPOSE 3000
CMD ["bundle", "exec", "puma", "-C", "config/puma.rb"]