Skip to content

Instantly share code, notes, and snippets.

@nanzhong
Created December 18, 2014 21:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nanzhong/7eb7b4a52931278a7a51 to your computer and use it in GitHub Desktop.
Save nanzhong/7eb7b4a52931278a7a51 to your computer and use it in GitHub Desktop.
FROM ruby:2.1.5
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY . /usr/src/app
ENV SECRET_KEY_BASE 6dd899954289073958f13101a1903a8e
RUN bundle install
RUN apt-get update
RUN apt-get install -y nodejs --no-install-recommends
RUN apt-get install -y mysql-client --no-install-recommends
RUN rm -rf /var/lib/apt/lists/*
EXPOSE 3000
CMD export RAILS_ENV=production; \
bundle exec rake db:create; \
bundle exec rake db:migrate; \
bundle exec rake db:seed; \
bundle exec rails server -p 3000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment