Last active
August 29, 2015 14:21
-
-
Save warmwaffles/da19898991c3689b2346 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| database: | |
| image: postgres | |
| ports: | |
| - "5432" | |
| redis: | |
| image: redis | |
| ports: | |
| - "6379" | |
| worker: | |
| image: web | |
| environment: | |
| DATABASE_HOST: database | |
| DATABASE_PORT: 5432 | |
| DATABASE_USER: postgres | |
| DATABASE_PASS: '' | |
| REDIS_URL: redis://redis:6379/0 | |
| PORT: 3000 | |
| command: bundle exec sidekiq | |
| volumes: | |
| - .:/app/someapp` | |
| links: | |
| - database | |
| - redis | |
| web: | |
| build: . | |
| environment: | |
| DATABASE_HOST: database | |
| DATABASE_PORT: 5432 | |
| DATABASE_USER: postgres | |
| DATABASE_PASS: '' | |
| REDIS_URL: redis://redis:6379/0 | |
| PORT: 3000 | |
| command: bundle exec rails server --port 3000 --binding 0.0.0.0 | |
| volumes: | |
| - .:/app/someapp` | |
| ports: | |
| - "3000:3000" | |
| links: | |
| - database | |
| - redis |
This file contains hidden or 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 | |
| RUN apt-get update -qq && \ | |
| apt-get install -y \ | |
| build-essential \ | |
| libpq-dev \ | |
| postgresql-client \ | |
| libxml2-dev \ | |
| libxslt1-dev \ | |
| nodejs && \ | |
| rm -rf /var/lib/apt/lists/* | |
| RUN apt-get update -qq && \ | |
| apt-get install -y nodejs-legacy && \ | |
| rm -rf /var/lib/apt/lists/* | |
| RUN gem install --no-document bundler | |
| # ################ | |
| ENV APP_NAME someapp | |
| ENV APP_DIR /app/$APP_NAME | |
| RUN mkdir -p /app && useradd -d $APP_DIR -m $APP_NAME | |
| WORKDIR $APP_DIR | |
| ADD Gemfile* $APP_DIR/ | |
| RUN bundle install --jobs 8 | |
| RUN chown -R $APP_NAME $APP_DIR | |
| ADD . $APP_DIR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment