Skip to content

Commit

Permalink
Add --live option to startup
Browse files Browse the repository at this point in the history
Easily run government-frontend against live content store and static
  • Loading branch information
boffbowsh committed Aug 5, 2016
1 parent 5d23b23 commit 0571f83
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,19 @@ This is a Ruby on Rails application that fetches documents from

### Running the application

`./startup.sh`
```
./startup.sh
```

The app should start on http://localhost:3090 or
http://government-frontend.dev.gov.uk on GOV.UK development machines.

```
./startup.sh --live
```

This will run the app and point it at the production GOV.UK `content-store` and `static` instances.

### Running the test suite

The test suite relies on the presence of the
Expand Down
11 changes: 10 additions & 1 deletion startup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
#!/bin/bash

bundle install
bundle exec rails s -p 3090

if [[ $1 == "--live" ]] ; then
GOVUK_APP_DOMAIN=www.gov.uk \
GOVUK_WEBSITE_ROOT=https://www.gov.uk \
PLEK_SERVICE_CONTENT_STORE_URI=https://www.gov.uk/api \
PLEK_SERVICE_STATIC_URI=assets.publishing.service.gov.uk \
bundle exec rails s -p 3090
else
bundle exec rails s -p 3090
fi

0 comments on commit 0571f83

Please sign in to comment.