hello world app

This commit is contained in:
Dr Nic Williams 2018-11-06 14:42:38 +10:00
commit 588820ccec
5 changed files with 51 additions and 0 deletions

9
Dockerfile Normal file
View File

@ -0,0 +1,9 @@
FROM ruby:2.5 as build-and-run
WORKDIR /app
EXPOSE 8080
COPY . /app
RUN bundle install
CMD ["bundle", "exec", "rackup", "-p", "8080", "-o", "0.0.0.0", "-s", "puma"]

8
Gemfile Normal file
View File

@ -0,0 +1,8 @@
# frozen_string_literal: true
source "https://rubygems.org"
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
gem "puma"
gem "sinatra"

24
Gemfile.lock Normal file
View File

@ -0,0 +1,24 @@
GEM
remote: https://rubygems.org/
specs:
mustermann (1.0.3)
puma (3.12.0)
rack (2.0.6)
rack-protection (2.0.4)
rack
sinatra (2.0.4)
mustermann (~> 1.0)
rack (~> 2.0)
rack-protection (= 2.0.4)
tilt (~> 2.0)
tilt (2.0.8)
PLATFORMS
ruby
DEPENDENCIES
puma
sinatra
BUNDLED WITH
1.16.3

7
app.rb Normal file
View File

@ -0,0 +1,7 @@
require 'sinatra/base'
class App < Sinatra::Base
get "/" do
"hello world"
end
end

3
config.ru Normal file
View File

@ -0,0 +1,3 @@
require File.expand_path('app', File.dirname(__FILE__))
run App