Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure asset host in development mode #100

Merged
merged 1 commit into from Feb 19, 2016
Merged

Conversation

@fofr
Copy link
Contributor

@fofr fofr commented Feb 15, 2016

When run under govuk_setenv, this configures the asset host to point at the assets-origin on the dev VM. This will give us better dev-prod parity, and enable running this behind the router in dev.

See also: alphagov/finder-frontend@d8f25e9

When run under `govuk_setenv`, this configures the asset host to point
at the assets-origin on the dev VM.  This will give us better dev-prod
parity, and enable running this behind the router in dev.

See also:
alphagov/finder-frontend@d8f25e9
30ccc358622f8bf5f23
@@ -31,4 +31,8 @@

# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true

if ENV['GOVUK_ASSET_ROOT'].present?

This comment has been minimized.

@benlovell

benlovell Feb 15, 2016
Contributor

The present? isn't strictly necessary here.

@boffbowsh
Copy link
Contributor

@boffbowsh boffbowsh commented Feb 16, 2016

It'd be better to use Plek.new.asset_root here

@fofr
Copy link
Contributor Author

@fofr fofr commented Feb 16, 2016

Any updates here should probably also be reflected in alphagov/finder-frontend@d8f25e9 and alphagov/frontend@77bb2cb

@dsingleton
Copy link
Contributor

@dsingleton dsingleton commented Feb 19, 2016

It'd be better to use Plek.new.asset_root here

That doesn't have quite the right behaviour in all dev situations, unfortunately.

If GOVUK_ASSET_ROOT is not set then it defaults to static host as the asset_host to serve a FE app's assets.

On the VM within bowl this will work, as govuk_setenv will set GOVUK_ASSET_ROOT. Outside of bowl it will try and load the FE app's assets from the static domain, and 404s. Running a FE app outside the VM would have the same broken behaviour.

@boffbowsh
Copy link
Contributor

@boffbowsh boffbowsh commented Feb 19, 2016

Fair enough 👍

boffbowsh added a commit that referenced this pull request Feb 19, 2016
Configure asset host in development mode
@boffbowsh boffbowsh merged commit 3eec62f into master Feb 19, 2016
1 check passed
1 check passed
default Build #439 succeeded on Jenkins
Details
@boffbowsh boffbowsh deleted the allow-dev-with-router branch Feb 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.