Skip to main content

Application: static

GOV.UK static files and resources

AWS, on the draft_frontend machine class
Continuously deployed?
Rake tasks
Integration, Staging or ⚠️ Production ⚠️

Relevant manual pages

Imported documents


This application defines global templates for GOV.UK pages.


gem_layout template:



  • slimmer - Rack middleware for wrapping Rack applications in shared templated layouts

Technical documentation

Running the application


This will start the server running on

Running Locally

If you’d like to run static locally, and keep all its asset links pointing to the same local instance, you’ll need to set PLEK_SERVICE_STATIC_URI, which is the host used for static assets (even on static).

Otherwise it defaults to, which won’t exist if you’re running this repo locally, without the rest of the GOV.UK stack.

To run this app locally, and have it point at its own assets, run it like this:


If you’re making front end changes to static and testing them out on your development VM, you may find that it takes several minutes for changes to appear due to caching in Slimmer. One approach to speed this up is to run all of the relevant app’s dependencies (including static), then start that app separately. Restarting the app should pick up the changes.

For example, to see changes made to static templates which are wrapped around feedback pages, run bowl feedback --without=feedback in one terminal and the script for feedback in a separate terminal. Following local edits to static, restarting only feedback should be sufficient.

If you repeatedly see 504 Gateway Timeout errors when developing with static in your development VM it’s possible to increase the proxy_read_timeout value in /etc/nginx/sites-available/ and restart nginx on the VM.

Running the test suite

bundle exec rake runs the test suite.

Javascript unit tests

Tests can run in browser at /specs

Or in terminal to run only the jasmine tests you can use RAILS_ENV=test bundle exec rake jasmine:ci or in Docker govuk-docker run -e RAILS_ENV=test static-lite bundle exec rake jasmine:ci