-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #336 from seart-group/enhancement/build
- Loading branch information
Showing
12 changed files
with
1,106 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,4 +19,4 @@ jobs: | |
- name: Install Dependencies | ||
run: npm ci | ||
- name: Run ESLint | ||
run: npm run lint-js | ||
run: npm run lint:js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,15 @@ | ||
FROM node:lts-alpine AS build | ||
|
||
SHELL ["/bin/ash", "-eo", "pipefail", "-c"] | ||
COPY html /html/ | ||
COPY package.json \ | ||
package-lock.json \ | ||
/ | ||
|
||
RUN apk update --quiet && \ | ||
apk add --no-cache \ | ||
--quiet \ | ||
moreutils~=0.68 | ||
|
||
RUN npm install -g --silent --no-progress \ | ||
[email protected] \ | ||
[email protected] \ | ||
[email protected] | ||
|
||
WORKDIR / | ||
COPY html html/ | ||
|
||
RUN html-minifier-terser --collapse-whitespace \ | ||
--remove-comments \ | ||
--process-scripts='["text/html","text/x-handlebars-template"]' \ | ||
html/index.html \ | ||
| sponge html/index.html | ||
|
||
RUN for file in html/css/*.css; \ | ||
do cleancss "$file" | sponge "$file"; \ | ||
done | ||
|
||
RUN for file in html/js/*.js; \ | ||
do uglifyjs --compress --mangle --webkit -- "$file" | sponge "$file"; \ | ||
done | ||
RUN npm ci --silent --no-progress && npm run build | ||
|
||
FROM nginx:1.25.4-alpine-slim | ||
LABEL maintainer="Ozren Dabić ([email protected])" | ||
|
||
COPY --from=build html /usr/share/nginx/html | ||
COPY --from=build dist /usr/share/nginx/html | ||
|
||
ENTRYPOINT ["nginx", "-g", "daemon off;"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.