Skip to content

Instantly share code, notes, and snippets.

@cbankston
Created February 23, 2016 20:03
Show Gist options
  • Save cbankston/bec48878e3a24a1b3efd to your computer and use it in GitHub Desktop.
Save cbankston/bec48878e3a24a1b3efd to your computer and use it in GitHub Desktop.
Ruby Docker Project
RDS_HOSTNAME=db
RDS_USERNAME=root
RDS_PASSWORD=some_password
db:
image: mysql
env_file:
- '.env.db'
web:
build: .
command: bundle exec rails s -p 3000 -b '0.0.0.0'
volumes:
- .:/myapp
ports:
- "3000:3000"
links:
- db
env_file:
- '.env.web'
FROM ruby:2.1.3
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev cmake nodejs
RUN mkdir /myapp
WORKDIR /myapp
ADD . /myapp/
RUN bundle install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment