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:
parent
c5fd084577
commit
b19b51c78c
15 changed files with 1074 additions and 226 deletions
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue