Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Docker support (Dockerfile). #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM ruby:2.2

ENV GINATRA_PORT 9797

RUN apt-get update \
&& apt-get install -y git cmake \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /usr/src/app
COPY . /usr/src/app
RUN bundle install \
&& apt-get purge -y --auto-remove cmake

EXPOSE 9797
CMD bundle exec puma --port $GINATRA_PORT ./config.ru
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason to explicitly use puma server? You can start server via ginatra run command.

2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
source 'https://rubygems.org'

gemspec

gem 'puma'
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ GEM
erubis (2.7.0)
hike (1.2.3)
multi_json (1.10.1)
puma (2.10.2)
rack (>= 1.1, < 2.0)
rack (1.6.0)
rack-protection (1.5.3)
rack
Expand Down Expand Up @@ -67,6 +69,7 @@ DEPENDENCIES
better_errors (~> 1.1.0)
binding_of_caller
ginatra!
puma
rack-test
rake
rspec
Expand Down