Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Add Docker Compose development environment
Signed-off-by: Tom Duffield <tom@chef.io>
- Loading branch information
Showing
7 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
*.gem | ||
*.rbc | ||
.bundle | ||
.docker_bundle | ||
.config | ||
.yardoc | ||
Gemfile.lock | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM ruby:2.3 | ||
MAINTAINER Tom Duffield <tom@chef.io> | ||
|
||
# We need `git` because oftentimes .gemspec depends on it for listing files | ||
RUN apt-get update && \ | ||
apt-get install -y git && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
RUN gem install bundler && mkdir /app | ||
COPY start /start | ||
WORKDIR /app | ||
CMD ["/start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
source "https://rubygems.org" | ||
|
||
gemspec | ||
|
||
group :docker do | ||
gem "lita-slack" | ||
gem "guard" | ||
gem "guard-process" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Because we run Lita in a container, don't connect to STDIN | ||
interactor :off | ||
|
||
# Restart the lita CLI anytime we modify the lita_config or a lita file | ||
guard "process", name: "Lita", command: "bundle exec lita" do | ||
watch("lita_config.rb") | ||
watch(%r{^lib/*}) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
version: '3' | ||
services: | ||
lita: | ||
build: . | ||
links: | ||
- redis:redis | ||
volumes: | ||
# Sync all the local code to the app directory | ||
- ./:/app | ||
# Since we are syncing the whole directory, we need to make sure our local `.bundle` directory is not over-written | ||
- ./.docker_bundle:/app/.bundle | ||
environment: | ||
- SLACK_TOKEN | ||
redis: | ||
image: redis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
require "lita/adapters/slack" | ||
|
||
Lita.configure do |config| | ||
config.robot.log_level = :debug | ||
config.robot.adapter = :slack | ||
config.robot.admins = ["1"] | ||
|
||
# Use the redis host linked via docker-compose | ||
config.redis[:host] = "redis" | ||
|
||
config.adapters.slack.token = ENV["SLACK_TOKEN"] | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
# This file is intended for use only in the Docker environment. If you wish to run Expeditor locally, please run | ||
# bundle exec lita | ||
|
||
bundle install --path /var/bundle --jobs $(nproc) --clean | ||
|
||
exec bundle exec guard |