Skip to content
This repository has been archived by the owner on Jun 5, 2019. It is now read-only.

Commit

Permalink
Release openproject-ce v5.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverguenther committed Jan 8, 2016
2 parents a33b195 + 79aa23d commit 7d2f56c
Show file tree
Hide file tree
Showing 180 changed files with 9,256 additions and 811 deletions.
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.git
.bundle
.env*
tmp
frontend/node_modules
# travis
vendor/bundle
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ cache:
- frontend/node_modules
- frontend/bower_components

bundler_args: --without development production
bundler_args: --without development production docker

branches:
only:
Expand Down
50 changes: 50 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
FROM ruby:2.1

ENV NODE_VERSION="0.12.7"
ENV BUNDLER_VERSION="1.10.6"

# install node + npm
RUN curl https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.gz | tar xzf - -C /usr/local --strip-components=1

# Using /home/app since npm cache and other stuff will be put there when running npm install
# We don't want to pollute any locally-mounted directory
RUN useradd -d /home/app -m app
RUN mkdir -p /usr/src/app
RUN chown -R app /usr/src/app /usr/local/bundle
RUN gem install bundler --version "${BUNDLER_VERSION}"

WORKDIR /usr/src/app

# https registry breaks so often it's no longer funny
RUN echo "registry = 'http://registry.npmjs.org/'" >> /usr/local/etc/npmrc
# moar logs
RUN echo "loglevel=info" >> /usr/local/etc/npmrc

COPY Gemfile ./Gemfile
COPY Gemfile.* ./
RUN chown -R app:app /usr/src/app

USER app
RUN bundle install --jobs 8 --retry 3

USER root
# Then, npm install node modules
COPY package.json /tmp/npm/package.json
COPY frontend/*.json /tmp/npm/frontend/
RUN chown -R app:app /tmp/npm

USER app
RUN cd /tmp/npm && RAILS_ENV=production npm install
RUN mv /tmp/npm/frontend /usr/src/app/

# Finally, copy over the whole thing
USER root
COPY . /usr/src/app
RUN cp docker/Procfile .
RUN sed -i "s|Rails.groups(:opf_plugins)|Rails.groups(:opf_plugins, :docker)|" config/application.rb
RUN chown -R app:app /usr/src/app

USER app
RUN DATABASE_URL=sqlite3:///tmp/db.sqlite3 SECRET_TOKEN=foobar RAILS_ENV=production bundle exec rake assets:precompile

CMD ["./docker/web"]
17 changes: 15 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ gem 'cocaine'
# also, better than thin since we can control worker concurrency.
gem 'unicorn'

gem 'nokogiri', '~> 1.6.6'
gem 'nokogiri', '~> 1.6.7'

gem 'carrierwave', '~> 0.10.0'
gem 'fog', '~> 1.23.0', require: 'fog/aws/storage'
Expand Down Expand Up @@ -230,7 +230,20 @@ platforms :jruby do
end

group :opf_plugins do
gem 'openproject-translations', git:'https://github.com/opf/openproject-translations.git', tag: 'v5.0.7'
gem 'openproject-translations', git:'https://github.com/opf/openproject-translations.git', tag: 'v5.0.8'
end

# TODO: Make this group :optional when bundler v10.x
# is matured enough that we can use this everywhere
# http://bundler.io/blog/2015/06/24/version-1-10-released.html
group :docker do
gem 'passenger'

# Used to easily precompile assets
gem 'sqlite3', require: false
gem 'rails_12factor', require: !!ENV['HEROKU']
gem 'health_check', require: !!ENV['HEROKU']
gem 'newrelic_rpm', require: !!ENV['HEROKU']
end

# Load Gemfile.local, Gemfile.plugins and plugins' Gemfiles
Expand Down
Loading

0 comments on commit 7d2f56c

Please sign in to comment.