diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..0fcc4a44 --- /dev/null +++ b/Dockerfile @@ -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 diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..48f53d1c --- /dev/null +++ b/docker-compose.yml @@ -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