Skip to content

Instantly share code, notes, and snippets.

@hadrienblanc
Created December 18, 2017 14:10
Show Gist options
  • Save hadrienblanc/63bf1f4f7696a78825b77c67d312bb21 to your computer and use it in GitHub Desktop.
Save hadrienblanc/63bf1f4f7696a78825b77c67d312bb21 to your computer and use it in GitHub Desktop.
version: '2'
services:
web:
build: .
command: bundle exec rails s -p 3000 -b '0.0.0.0'
volumes:
- .:/myapp
ports:
- "3000:3000"
depends_on:
- redis
- db
env_file:
- myapp.env
redis:
image: redis
sidekiq:
build: .
command: bundle exec sidekiq
depends_on:
- redis
env_file:
- myapp.env
db:
image: mysql
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: xxx
MYSQL_USER: xxx
@hadrienblanc
Copy link
Author

FROM ruby:2.3.3
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
RUN mkdir /myapp
WORKDIR /myapp
COPY Gemfile /myapp/Gemfile
COPY Gemfile.lock /myapp/Gemfile.lock
RUN bundle install
COPY . /myapp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment