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

@ -3,9 +3,13 @@ RUN apk update && apk add curl yarn python3 build-base gcc wget git --no-cache
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 --ignore-scripts --prefer-offline --pure-lockfile
RUN yarn --prefer-offline --pure-lockfile
# Build
COPY generate_translations.js \
@ -20,7 +24,7 @@ COPY src src
# Set UI version
RUN echo "export const VERSION = 'dev';" > "src/shared/version.ts"
RUN yarn install --ignore-scripts --prefer-offline
RUN yarn --prefer-offline
RUN yarn build:dev
FROM node:alpine as runner
@ -29,4 +33,4 @@ COPY --from=builder /usr/src/app/node_modules /app/node_modules
EXPOSE 1234
WORKDIR /app
CMD node dist/js/server.js
CMD node dist/js/server.js