Skip to content

towards/static-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Static site example for Gleis PaaS

This is a simple static site example made for the Gleis PaaS using the Rack webserver interface. Its purpose is to show that one can also use the Gleis platform to easily and quickly deploy a static site which does not have any application logic but just consists of HTML, CSS, Javascript and image files.

Prerequisites

In order to run this example static site locally you will need Ruby along with the Bundler gem to be installed on your computer. As soon as you are ready to deploy you will need an account on the Gleis PaaS as well as the Gleis CLI Ruby gem.

Try out the example static site locally

Download your own copy of this example static site:

$ git clone [email protected]:towards/static-example.git
$ cd static-example

Install the dependencies:

$ bundle

Start the server:

$ rackup

The example static site should now be reachable locally on your computer at http://localhost:9292

Deploy site to Gleis

Create new app on Gleis:

$ gleis app create

Upload site to Gleis:

$ git push gleis master

The example site will be online in a few seconds and reachable through the secure URL mentioned when you created the Gleis app with the above command.

Remarks

  • If you would like to add a new page to your static site simply create a new directory inside the public directory and add an index.html file.
  • Image, Javascript and stylesheet files should be stored in their respective directory under the public/assets directory.
  • Browser caching of static assets is set to 10 days.
  • For a more complex site try the Jekyll static site generator which can then also be deployed to Gleis.

About

Static site example using Rack for the Gleis PaaS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published