Skip to content

Commit

Permalink
chore: add ability developing in Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
bibendi committed Oct 30, 2019
1 parent 01c9d06 commit 557bcca
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 1 deletion.
16 changes: 16 additions & 0 deletions .dockerdev/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: '3.4'

services:
app:
image: ruby:2.6
environment:
- GEM_HOME=/bundle
- BUNDLE_PATH=/bundle
- HISTFILE=/app/tmp/.bash_history
working_dir: /app
volumes:
- ..:/app
- bundle:/bundle

volumes:
bundle:
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

## master

- Require a minimum version of Ruby when installing the gem. ([@bibendi][])
- Require a minimum version of Ruby when installing the gem. ([@bibendi][])

- Add ability to develop the gem with Docker. ([@bibendi][])

## 0.6.4 (2019-06-26) 👶

Expand Down Expand Up @@ -133,3 +135,4 @@ Ignore tagged logger features ('cause we do not have _persistent_ logger).
[@alekseyl]: https://github.com/alekseyl
[@DmitryTsepelev]: https://github.com/DmitryTsepelev
[@sponomarev]: https://github.com/sponomarev
[@bibendi]: https://github.com/bibendi
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,9 @@ See [documentation](https://docs.anycable.io/#/ruby/compatibility).

Bug reports and pull requests are welcome on GitHub at https://github.com/anycable/anycable-rails.

## Development

If you are familiar with Docker, you can use [DIP](https://github.com/bibendi/dip) to start developing the gem quickly.

## License
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
42 changes: 42 additions & 0 deletions dip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
version: '4'

compose:
files:
- .dockerdev/docker-compose.yml
project_name: anycable-rails

interaction:
bash:
description: Open a Bash shell in app's container
service: app
command: /bin/bash

dev:
service: app
command: exit
subcommands:
console:
description: Open a gem console
command: ./bin/console
clean:
description: Clean dependencies
command: rm -rf Gemfile.lock

bundle:
description: Run Bundler commands
service: app
command: bundle

rspec:
description: Run RSpec commands
service: app
command: bundle exec rspec

rubocop:
description: Run Rubocop commands
service: app
command: bundle exec rubocop

provision:
- dip dev clean
- dip bundle install

0 comments on commit 557bcca

Please sign in to comment.