This commit is contained in:
Zachary Chai 2016-10-17 10:53:35 -04:00
parent 0fc0e27d02
commit c32b48213a
2 changed files with 31 additions and 0 deletions

7
Dockerfile Normal file
View File

@ -0,0 +1,7 @@
FROM ruby:2.3.1
# app dependencies
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
# app directory
RUN mkdir /usr/src/app

24
docker-compose.yml Normal file
View File

@ -0,0 +1,24 @@
version: '2'
services:
web:
build: .
ports:
- '80:80'
volumes:
- '.:/usr/src/app'
- '~/.ssh:/root/.ssh/'
volumes_from:
- gem_cache
expose:
- '3001'
working_dir: '/usr/src/app'
stdin_open: true
tty: true
command: bundle exec rails s -p 80 -b '0.0.0.0'
depends_on:
- gem_cache
gem_cache:
image: ruby:2.3.1
command: bin/true
volumes:
- /usr/local/bundle