Skip to content
This repository has been archived by the owner on Dec 14, 2022. It is now read-only.

Commit

Permalink
Merge pull request #131 from remind101/docker
Browse files Browse the repository at this point in the history
Get a working docker env
  • Loading branch information
bmarini committed Aug 21, 2018
2 parents 0618d22 + b892eda commit c2563a5
Show file tree
Hide file tree
Showing 10 changed files with 198 additions and 154 deletions.
12 changes: 8 additions & 4 deletions .travis.yml
@@ -1,10 +1,14 @@
language: ruby
cache: bundler
rvm:
- 2.5.1
before_script: "./bin/rake db:setup"
script: "./bin/rake"
- 2.5.1
before_script:
- psql -c 'create database travis_ci_test;' -U postgres
- ./bin/rake db:setup
env:
- DATABASE_URL=postgres://postgres:@localhost/travis_ci_test
script: ./bin/rake
notifications:
email: false
addons:
postgresql: "9.2" # json data type was introduced in postgres 9.2. Travis default is 9.1
postgresql: "9.6" # json data type was introduced in postgres 9.2. Travis default is 9.1
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Expand Up @@ -28,6 +28,14 @@ The following external dependencies are also required:
1. create database schema: `bundle exec rake db:setup`
1. migrate database schema: `bundle exec rake db:migrate`

## Docker

You can also use Docker for development and testing:

```
make test
```

## Tests

The full test suite can be run with:
Expand Down
15 changes: 15 additions & 0 deletions Dockerfile
@@ -0,0 +1,15 @@
FROM ruby:2.5.1
RUN apt-get update && \
apt-get install -y build-essential openssl libssl-dev libpq-dev postgresql-client
RUN gem install bundler

RUN mkdir -p /home/app
WORKDIR /home/app

COPY Gemfile /home/app/
COPY Gemfile.lock /home/app/
RUN bundle install --jobs 4 --retry 3

COPY . /home/app

CMD ["bundle", "exec", "rake"]
10 changes: 6 additions & 4 deletions Gemfile
Expand Up @@ -8,11 +8,12 @@ gem 'uglifier', '>= 1.3.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'virtus'
gem 'pg'
gem 'pg', '~> 0.21'
gem 'postgres_ext'
gem 'oj'
gem 'puma'
gem 'sass'
gem 'therubyracer'

# Github API Client Library.
gem 'octokit', '>= 4.9.0'
Expand All @@ -27,7 +28,7 @@ gem 'sidekiq'
# Visibility
gem 'rollbar', '~> 2.8.0'
gem 'lograge'
gem 'dogstatsd-ruby'
gem 'dogstatsd-ruby', '~> 1.5.0'

# Auth
gem 'jwt'
Expand All @@ -39,7 +40,8 @@ gem 'omniauth-oauth2'
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug'
gem 'rspec-rails', '~> 3.0'
gem 'rspec', '~> 3.7.0'
gem 'rspec-rails'
gem 'rspec-activemodel-mocks'
gem 'rubocop', '~> 0.58.0'

Expand All @@ -50,7 +52,7 @@ end
group :test do
gem 'webmock', require: false
gem 'capybara'
gem 'codeclimate-test-reporter', require: nil
gem 'codeclimate-test-reporter', '0.4.8', require: nil
end

group :development do
Expand Down

0 comments on commit c2563a5

Please sign in to comment.