diff --git a/.ruby-version b/.ruby-version index eca07e4c..ccbccc3d 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.1.2 +2.2.0 diff --git a/Dockerfile b/Dockerfile index 879d74ce..89c7d880 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,27 +1,28 @@ -FROM bterkuile/ruby-base - -MAINTAINER Benjamin ter Kuile - -# Add 'web' user which will run the application -RUN adduser web --home /home/web --shell /bin/bash --disabled-password --gecos "" - -# Separate Gemfile ADD so that `bundle install` can be cached more effectively -ADD Gemfile /var/www/ -ADD Gemfile.lock /var/www/ -RUN chown -R web:web /var/www &&\ - mkdir -p /var/bundle &&\ - chown -R web:web /var/bundle -RUN su -c "cd /var/www && bundle install --deployment --without development test assets --path /var/bundle" -s /bin/bash -l web - -# Add application source -ADD . /var/www -RUN chown -R web:web /var/www - -USER web - -WORKDIR /var/www - -#VOLUME ['/Users/bterkuile/companytools/development/rails/mozo_bar/public/system:/var/www/public/system'] -EXPOSE 3000 - -CMD ["bundle", "exec", "foreman", "start"] +FROM rails:onbuild +#FROM bterkuile/ruby-base +# +#MAINTAINER Benjamin ter Kuile +# +## Add 'web' user which will run the application +#RUN adduser web --home /home/web --shell /bin/bash --disabled-password --gecos "" +# +## Separate Gemfile ADD so that `bundle install` can be cached more effectively +#ADD Gemfile /var/www/ +#ADD Gemfile.lock /var/www/ +#RUN chown -R web:web /var/www &&\ +# mkdir -p /var/bundle &&\ +# chown -R web:web /var/bundle +#RUN su -c "cd /var/www && bundle install --deployment --without development test assets --path /var/bundle" -s /bin/bash -l web +# +## Add application source +#ADD . /var/www +#RUN chown -R web:web /var/www +# +#USER web +# +#WORKDIR /var/www +# +##VOLUME ['/Users/bterkuile/companytools/development/rails/mozo_bar/public/system:/var/www/public/system'] +#EXPOSE 3000 +# +#CMD ["bundle", "exec", "foreman", "start"] diff --git a/fig.yml b/fig.yml new file mode 100644 index 00000000..46ff969b --- /dev/null +++ b/fig.yml @@ -0,0 +1,16 @@ +db: + image: bterkuile/couchdb + volumes: + - .db:/usr/local/var/lib/couchdb + expose: + - 5984 +web: + build: . + #command: bundle exec unicorn -p 3000 -c ./config/unicorn.rb + command: rails s + volumes: + - .:/usr/src/app + ports: + - "3000:3000" + links: + - db