Skip to content

Commit

Permalink
Add version 1 of the swarm frontend
Browse files Browse the repository at this point in the history
[refs %929d116b6795]
  • Loading branch information
jfahrer committed May 5, 2018
1 parent 1127401 commit e5222a3
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 0 deletions.
12 changes: 12 additions & 0 deletions swarm/swarm-demo-frontend/Dockerfile
@@ -0,0 +1,12 @@
FROM ruby:2.4.3-alpine

WORKDIR /tmp
COPY Gemfile* ./
RUN bundle install

WORKDIR /app
COPY . .

EXPOSE 8080

CMD ["/usr/local/bin/bundle", "exec", "ruby", "app.rb"]
3 changes: 3 additions & 0 deletions swarm/swarm-demo-frontend/Gemfile
@@ -0,0 +1,3 @@
source 'https://rubygems.org'

gem 'sinatra'
22 changes: 22 additions & 0 deletions swarm/swarm-demo-frontend/Gemfile.lock
@@ -0,0 +1,22 @@
GEM
remote: https://rubygems.org/
specs:
mustermann (1.0.1)
rack (2.0.3)
rack-protection (2.0.0)
rack
sinatra (2.0.0)
mustermann (~> 1.0)
rack (~> 2.0)
rack-protection (= 2.0.0)
tilt (~> 2.0)
tilt (2.0.8)

PLATFORMS
ruby

DEPENDENCIES
sinatra

BUNDLED WITH
1.15.4
15 changes: 15 additions & 0 deletions swarm/swarm-demo-frontend/app.rb
@@ -0,0 +1,15 @@
require 'sinatra'

set :bind, '0.0.0.0'
set :port, 8080

get '/' do
<<-BODY
<html>
<body>
<h1>Docker Swarm Demo</h1>
<p>This page was served by <b>#{Socket.gethostname}</b></p>
</body>
</html>
BODY
end
12 changes: 12 additions & 0 deletions swarm/swarm-demo-frontend/docker-compose.yml
@@ -0,0 +1,12 @@
services:
version: "3.3"

services:
frontend:
image: jfahrer/swarm-demo-frontend:v1
build:
context: .
ports:
- 8080:8080
volumes:
- .:/app

0 comments on commit e5222a3

Please sign in to comment.