-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3b6f3db
commit 4efe0d6
Showing
6 changed files
with
127 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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
## MAC OS | ||
.DS_Store | ||
.com.apple.timemachine.supported | ||
|
||
## TEXTMATE | ||
*.tmproj | ||
tmtags | ||
|
||
## EMACS | ||
*~ | ||
\#* | ||
.\#* | ||
|
||
## REDCAR | ||
.redcar | ||
|
||
## VIM | ||
*.swp | ||
*.swo | ||
|
||
## RUBYMINE | ||
.idea | ||
|
||
## PROJECT::GENERAL | ||
coverage | ||
doc | ||
pkg | ||
.rvmrc | ||
.ruby-version | ||
.ruby-gemset | ||
.rspec_status | ||
.bundle | ||
.byebug_history | ||
dist | ||
Gemfile.lock | ||
gemfiles/*.lock | ||
tmp | ||
.yardoc | ||
|
||
## Rubinius | ||
.rbx | ||
|
||
## Bundler binstubs | ||
bin | ||
|
||
## ripper-tags and gem-ctags | ||
tags | ||
|
||
## PROJECT::SPECIFIC | ||
.project |
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
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
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,17 @@ | ||
version: '3' | ||
|
||
volumes: | ||
gems: | ||
|
||
services: | ||
grape: | ||
build: | ||
context: . | ||
dockerfile: docker/Dockerfile | ||
args: | ||
- RUBY_VERSION=${RUBY_VERSION:-3} | ||
stdin_open: true | ||
tty: true | ||
volumes: | ||
- .:/var/grape | ||
- gems:/usr/local/bundle |
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 @@ | ||
ARG RUBY_VERSION | ||
FROM ruby:$RUBY_VERSION-alpine | ||
|
||
ENV BUNDLE_PATH /usr/local/bundle/gems | ||
ENV LIB_PATH /var/grape | ||
|
||
RUN apk add --update --no-cache make gcc git libc-dev && \ | ||
gem update --system && gem install bundler | ||
|
||
WORKDIR $LIB_PATH | ||
|
||
COPY /docker/entrypoint.sh /usr/local/bin/docker-entrypoint.sh | ||
RUN chmod +x /usr/local/bin/docker-entrypoint.sh | ||
|
||
ENTRYPOINT ["docker-entrypoint.sh"] |
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,16 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
# Useful information | ||
echo -e "$(ruby --version)\nrubygems $(gem --version)\n$(bundle version)" | ||
if [ -z "${GEMFILE}" ] | ||
then | ||
echo "Running default Gemfile" | ||
else | ||
export BUNDLE_GEMFILE="./gemfiles/${GEMFILE}.gemfile" | ||
echo "Running gemfile: ${GEMFILE}" | ||
fi | ||
|
||
# Keep gems in the latest possible state | ||
(bundle check || bundle install) && bundle update && bundle exec ${@} |