-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
#565 Provide optional SRI hash when displaying embed code #730
base: development
Are you sure you want to change the base?
Changes from 8 commits
f6d7558
37a4691
b3cc965
a2f0344
4c95b87
e8f042f
ac23ced
4d37805
4a99c27
c330d71
928990a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -10,32 +10,33 @@ ENV ADBLOCK true | |||||||||||||||||||||||
ENV DISABLE_OPENCOLLECTIVE true | ||||||||||||||||||||||||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
FROM offen_node as auditorium | ||||||||||||||||||||||||
FROM offen_node as script | ||||||||||||||||||||||||
ARG skip_locales | ||||||||||||||||||||||||
ENV SKIP_LOCALES=$skip_locales | ||||||||||||||||||||||||
COPY ./auditorium/package.json ./auditorium/package-lock.json /code/deps/ | ||||||||||||||||||||||||
COPY ./script/package.json ./script/package-lock.json /code/deps/ | ||||||||||||||||||||||||
WORKDIR /code/deps | ||||||||||||||||||||||||
RUN npm ci | ||||||||||||||||||||||||
COPY ./auditorium /code/auditorium | ||||||||||||||||||||||||
COPY ./script /code/script | ||||||||||||||||||||||||
COPY ./banner.txt /code/banner.txt | ||||||||||||||||||||||||
COPY ./locales /code/auditorium/locales | ||||||||||||||||||||||||
WORKDIR /code/auditorium | ||||||||||||||||||||||||
RUN cp -a /code/deps/node_modules /code/auditorium/ | ||||||||||||||||||||||||
COPY ./locales /code/script/locales | ||||||||||||||||||||||||
WORKDIR /code/script | ||||||||||||||||||||||||
RUN cp -a /code/deps/node_modules /code/script/ | ||||||||||||||||||||||||
ENV NODE_ENV production | ||||||||||||||||||||||||
RUN npm run build | ||||||||||||||||||||||||
RUN npm run licenses | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
FROM offen_node as script | ||||||||||||||||||||||||
FROM offen_node as auditorium | ||||||||||||||||||||||||
ARG skip_locales | ||||||||||||||||||||||||
ENV SKIP_LOCALES=$skip_locales | ||||||||||||||||||||||||
COPY ./script/package.json ./script/package-lock.json /code/deps/ | ||||||||||||||||||||||||
COPY ./auditorium/package.json ./auditorium/package-lock.json /code/deps/ | ||||||||||||||||||||||||
WORKDIR /code/deps | ||||||||||||||||||||||||
RUN npm ci | ||||||||||||||||||||||||
COPY ./script /code/script | ||||||||||||||||||||||||
COPY ./auditorium /code/auditorium | ||||||||||||||||||||||||
COPY --from=script ./code/script/index.js /code/auditorium/script/index.js | ||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This copies the entrypoint file when instead we need to copy the bundled versions. See my comment on how to do this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't this invoke the behavior we need?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is a bundle created per locale (the script logs user facing messages in some cases which are localized) so we need t copy the entire dist directory and then pick the correct one in the build for See: Lines 43 to 44 in c7aed87
Lines 76 to 84 in c7aed87
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To not bother you with more questions I'll need some time to work me through the build process. To be honest it is a lot magic for me right now. I'm not quite sure how gulp works together with the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you have questions while doing so, don't worry about bothering me. In any case, take your time. Thanks. |
||||||||||||||||||||||||
COPY ./banner.txt /code/banner.txt | ||||||||||||||||||||||||
COPY ./locales /code/script/locales | ||||||||||||||||||||||||
WORKDIR /code/script | ||||||||||||||||||||||||
RUN cp -a /code/deps/node_modules /code/script/ | ||||||||||||||||||||||||
COPY ./locales /code/auditorium/locales | ||||||||||||||||||||||||
WORKDIR /code/auditorium | ||||||||||||||||||||||||
RUN cp -a /code/deps/node_modules /code/auditorium/ | ||||||||||||||||||||||||
ENV NODE_ENV production | ||||||||||||||||||||||||
RUN npm run build | ||||||||||||||||||||||||
RUN npm run licenses | ||||||||||||||||||||||||
|
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.
It would be good if you could undo these formatting only changes as well even if standard is ok with them. It'll be easier to understand what changed if we don't have the additional noise in the diff.