Skip to content

Instantly share code, notes, and snippets.

@otukutun
Last active February 26, 2017 15:04
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 otukutun/ae1c403a80d0696a66fad484c2cff58d to your computer and use it in GitHub Desktop.
Save otukutun/ae1c403a80d0696a66fad484c2cff58d to your computer and use it in GitHub Desktop.
version: '2'
services:
db:
image: postgres
node:
build: .
command: bin/webpack-watcher
volumes:
- .:/app
depends_on:
- db
environment:
DATABASE_URL: postgresql://postgres:@db/ganbaruzoi_development
RAILS_ENV: development
web:
build: .
command: bin/rails s -p 3000 -b '0.0.0.0'
volumes:
- .:/app
ports:
- "3000:3000"
depends_on:
- db
- node
environment:
DATABASE_DEVELOPMENT_URL: postgresql://postgres:@db/ganbaruzoi_development
DATABASE_TEST_URL: postgresql://postgres:@db/ganbaruzoi_test
RAILS_ENV: development
# REF: byebugを使う設定 http://qiita.com/kbaba1001/items/39f81156589dd9a0d678
FROM ruby:2.3.3
ENV LANG C.UTF-8
RUN curl -sL https://deb.nodesource.com/setup_7.x | bash -
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
RUN npm install -g typescript
ENV APP /app
RUN mkdir $APP
WORKDIR $APP
ADD Gemfile Gemfile
ADD Gemfile.lock Gemfile.lock
RUN bundle install
ADD . $APP
RUN bin/yarn install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment