Skip to content

swcc/web_sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Composing containers to build a sample web stack

this is a work in progress for a blog post/presentation

Writting a simple web app in Ruby

Head to the webapp/ directory, take a look around, you'll find a very basic Sinatra app.

This is how you'll make in run:

docker build -t webapp .
sudo docker run --name webapp webapp

Serving with Nginx

Now that we've got an app running, we'll need a web server to control the traffic and server that app. Go now inside the nginx/ directory.

And run the server:

docker build -t nginx .
sudo docker run -p 80:80 --link webapp:webapp nginx

Adding a database to the web app

Alright, now we might need to persist data inside a database. Go to database/ and get a db running:

docker build -t postgresql .
docker run \
  -v /tmp/psql:/var/lib/postgresql \
  --name database postgresql

TODO

Plug-in a backend to the web app

Let's add a backend linked to our app. Take a look at backend/

TODO

Add an Message Passing software between backends

Hello amqp/

TODO

About

Sample web stack composed with containers.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages