Skip to content

Instantly share code, notes, and snippets.

@jenciso
Last active January 10, 2022 01:15
Show Gist options
  • Save jenciso/8c9b69ed1cf99d9c8ce1cd88ccf4431b to your computer and use it in GitHub Desktop.
Save jenciso/8c9b69ed1cf99d9c8ce1cd88ccf4431b to your computer and use it in GitHub Desktop.
FROM ruby:alpine
RUN apk add build-base && \
rm -rf /var/cache/apk/*
RUN mkdir /app
COPY . /app/
WORKDIR /app
RUN bundle install
CMD ["puma","-b","tcp://0.0.0.0:4567"]
source "https://rubygems.org"
gem 'sinatra'
gem 'puma'
require 'sinatra'
require 'puma'
configure {
set :server, :puma
}
class App < Sinatra::Base
get '/' do
"Hello World with Ruby!"
end
get '/hi' do
"Hi!"
end
get '/health' do
"Im Alive, TimeStamp: #{Time.now}"
end
end
source "https://rubygems.org"
gem 'sinatra'
gem 'puma'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment