Add support for PWA (#1005)

* Add logic for dynamically generating web manifest

* Make PWA icon get autogenerated

* Make service worker work

* Tweak things for PWA

* Handle apple icons and refactor

* Update prod dockerfile

* Remove jimp

* Remove unnecessary option

* Use different function syntax
This commit is contained in:
SleeplessOne1917 2023-05-12 01:07:59 +00:00 committed by GitHub
parent c5fd084577
commit b19b51c78c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 1074 additions and 226 deletions

View file

@ -4,9 +4,13 @@ RUN curl -sf https://gobinaries.com/tj/node-prune | sh
WORKDIR /usr/src/app
ENV npm_config_target_arch=x64
ENV npm_config_target_platform=linux
ENV npm_config_target_libc=musl
# Cache deps
COPY package.json yarn.lock ./
RUN yarn install --production --ignore-scripts --prefer-offline --pure-lockfile
RUN yarn --production --prefer-offline --pure-lockfile
# Build
COPY generate_translations.js \
@ -22,7 +26,7 @@ COPY .git .git
# Set UI version
RUN echo "export const VERSION = '$(git describe --tag)';" > "src/shared/version.ts"
RUN yarn install --production --ignore-scripts --prefer-offline
RUN yarn --production --prefer-offline
RUN yarn build:prod
# Prune the image