Created
February 22, 2015 00:02
-
-
Save sescobb27/1b6a9720bf81d3decf2b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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