Skip to content

Instantly share code, notes, and snippets.

@sescobb27
Created February 22, 2015 00:02
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 sescobb27/1b6a9720bf81d3decf2b to your computer and use it in GitHub Desktop.
Save sescobb27/1b6a9720bf81d3decf2b to your computer and use it in GitHub Desktop.
FROM ruby:2.2.0-onbuild
MAINTAINER sescobb27 "sescobb27@gmail.com"
RUN apt-get update -qq
RUN apt-get install -y build-essential git-core nodejs npm --no-install-recommends
# Installation:
# Import MongoDB public GPG key AND create a MongoDB list file
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
RUN echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | tee /etc/apt/sources.list.d/10gen.lis
# Update apt-get sources AND install MongoDB
RUN apt-get install -y mongodb-org
# Create the MongoDB data directory
RUN mkdir -p /data/db
# Expose port 27017 from the container to the host
EXPOSE 27017
# Set usr/bin/mongod as the dockerized entry-point application
ENTRYPOINT usr/bin/mongod
# APP
# Create directory from where the code will run
RUN npm install -g bower
RUN bower install
RUN bundle install --deployment --without development test
ENV RAILS_ENV production
ENV APP_NAME hurryup
ENV MONGODB_DB_HOST localhost
ENV MONGODB_DB_PORT 27017
ENV MONGODB_DB_USERNAME
ENV MONGODB_DB_PASSWORD
EXPOSE 80
CMD ["bundle exec", "puma -C config/puma.rb"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment