Last active
January 10, 2022 01:15
-
-
Save jenciso/8c9b69ed1cf99d9c8ce1cd88ccf4431b to your computer and use it in GitHub Desktop.
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
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"] |
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
source "https://rubygems.org" | |
gem 'sinatra' | |
gem 'puma' |
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
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 |
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
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