-
Notifications
You must be signed in to change notification settings - Fork 152
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
Hard-code CDN for now #5110
Hard-code CDN for now #5110
Conversation
@@ -66,6 +66,7 @@ export const searchMiddleware = async (req, res, next) => { | |||
html: layout, | |||
} | |||
res.status(status).send(layout) | |||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noticed a "cannot send headers" warning in console
|
@@ -2,8 +2,6 @@ FROM node:12.14-alpine | |||
|
|||
WORKDIR /app | |||
|
|||
ENV CDN_PRODUCTION_URL=https://d1s2w0upia4e9w.cloudfront.net CDN_STAGING_URL=https://d1rmpw1xlv9rxa.cloudfront.net |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This syntax is incorrect, you shouldn't be using an =
-- see an example here: https://github.com/artsy/volt/blob/master/Dockerfile#L3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I see this listed both ways in the file - here are the env docs, happy to pair on getting this working, https://docs.docker.com/engine/reference/builder/#environment-replacement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting that this ever worked on staging?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is weird, it worked on staging but not prod?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pulled that syntax directly from the docs
The second form, ENV = ..., allows for multiple variables to be set at one time. Notice that the second form uses the equals sign (=) in the syntax, while the first form does not. Like command line parsing, quotes and backslashes can be used to include spaces within values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, let me do hard cache clear -- Yup, it works. Going to unset EXPERIMENTAL_APP_SHELL
there and see what happens, but don't anticipate a change since the underlying bundle split logic is the same in both cases.
Update: everything looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. Thanks for updating it 👍
Noticed an
undefined
path in the search asset when deploying to prod earlier which has been observed in the past whenCDN_URL
was not found. We're still not 100% sure about the best way to encodeCDN_URL
so going to stick with hard-coding for right now.This has been tested locally with
EXPERIMENTAL_APP_SHELL=true
and also removed with these commands:yarn start
yarn start:prod
See slack convo from #dev where initial issue was reported.
(Note the
undefined
in the asset path)