Skip to content

Commit

Permalink
Add docker compose config
Browse files Browse the repository at this point in the history
  • Loading branch information
gondalez committed Aug 20, 2024
1 parent 68ca1ce commit f6e985d
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 1 deletion.
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# syntax=docker/dockerfile:1
FROM ruby:3.2.3-alpine as base

RUN apk --update add build-base git curl

WORKDIR /app

COPY . /app
RUN bundle install
1 change: 1 addition & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ GEM
unicode-display_width (2.5.0)

PLATFORMS
aarch64-linux-musl
arm64-darwin-23
x86_64-linux

Expand Down
7 changes: 7 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
services:
simplecov-inline:
build:
context: .
volumes:
- .:/app
- ${APPBOT_TOOL_FRIENDLY_HOST:-/dev/null}:${APPBOT_TOOL_FRIENDLY_CONTAINER:-/dev/null} # see usage in .env_example file
8 changes: 8 additions & 0 deletions docker/bundle
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

# https://gist.github.com/vncsna/64825d5609c146e80de8b1fd623011ca
set -euo pipefail

echo '[docker container]'

docker compose run --rm simplecov-inline bundle $*
8 changes: 8 additions & 0 deletions docker/rubocop
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

# https://gist.github.com/vncsna/64825d5609c146e80de8b1fd623011ca
set -euo pipefail

echo '[docker container]'

docker compose run --rm simplecov-inline rubocop $*
8 changes: 8 additions & 0 deletions docker/setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

# https://gist.github.com/vncsna/64825d5609c146e80de8b1fd623011ca
set -euo pipefail

echo '[docker container]'
docker compose down --remove-orphans
docker compose build
2 changes: 1 addition & 1 deletion simplecov-inline.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
spec.summary = "See missed lines of coverage inline with rspec output."
spec.homepage = "https://github.com/appbot/simplecov-inline"
spec.license = "MIT"
spec.required_ruby_version = ">= 2.6.0"
spec.required_ruby_version = '>= 3.1.0'

spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = "https://github.com/appbot/simplecov-inline"
Expand Down

0 comments on commit f6e985d

Please sign in to comment.