Skip to content

Commit

Permalink
Got this working with a basic sync of just the curatend/app directory…
Browse files Browse the repository at this point in the history
… into the /app/app directory in the container.
  • Loading branch information
Justin Gondron committed Jul 26, 2018
1 parent dc49aba commit eb48ed1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
11 changes: 5 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,13 @@ services:
context: .
dockerfile: docker/Dockerfile.rails
command: bundle exec thin start -p 3000 --ssl --ssl-key-file dev_server_keys/server.key --ssl-cert-file dev_server_keys/server.crt
environment:
BUNDLE_PATH: "/bundle"
BUNDLE_DISABLE_SHARED_GEMS: "true"
BUNDLE_WITHOUT: "headless"
volumes:
- .:/myapp
ports:
- "3000:3000"
volumes:
- rails-app-sync:/app/app:nocopy
depends_on:
- mysql
- jetty
volumes:
rails-app-sync:
external: true
9 changes: 9 additions & 0 deletions docker-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: "2"

options:
verbose: true
syncs:
rails-app-sync: # tip: add -sync and you keep consistent names as a convention
src: './app'
# sync_strategy: 'native_osx' # not needed, this is the default now
sync_excludes: ['ignored_folder', '.ignored_dot_folder']
8 changes: 2 additions & 6 deletions docker/Dockerfile.rails
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@ FROM ruby:2.1.10

RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs
RUN mkdir /app
RUN mkdir /bundle

WORKDIR /bundle
COPY Gemfile /bundle/Gemfile
COPY Gemfile.lock /bundle/Gemfile.lock
RUN bundle install --without headless --path /bundle

WORKDIR /app
COPY . /app

RUN bundle install --without headless

0 comments on commit eb48ed1

Please sign in to comment.