parent
ae79e9fea1
commit
0f32968fae
|
@ -1,3 +1 @@
|
|||
public/env.sample.js
|
||||
public/workbox-*.js
|
||||
public/workbox-*.js.map
|
||||
public/env.sample.js
|
12
Dockerfile
12
Dockerfile
|
@ -1,18 +1,14 @@
|
|||
FROM node:15.5.1-alpine3.12
|
||||
WORKDIR /app
|
||||
RUN npm i -g pnpm
|
||||
COPY package.json ./
|
||||
RUN pnpm i
|
||||
COPY package.json *.config.js workbox-config.js template-copy.js index.template.html s-config.template.js ./
|
||||
RUN yarn
|
||||
COPY package.json *.config.js index.html ./
|
||||
COPY src ./src
|
||||
COPY public ./public
|
||||
RUN pnpm run build
|
||||
RUN yarn build
|
||||
# final image
|
||||
FROM alpine
|
||||
COPY --from=0 /app/build /app
|
||||
RUN rm -rf /app/build/_dist_/components
|
||||
RUN rm -rf /app/build/_dist_/locales
|
||||
RUN rm -rf /app/build-manifest.json
|
||||
COPY --from=0 /app/dist /app
|
||||
FROM fholzer/nginx-brotli:v1.19.1
|
||||
COPY --from=1 /app /usr/share/nginx/html
|
||||
COPY ./nginx.conf /etc/nginx/nginx.conf
|
|
@ -6,6 +6,14 @@ http {
|
|||
server {
|
||||
error_page 404 /index.html;
|
||||
root /usr/share/nginx/html;
|
||||
location = /index.html {
|
||||
internal;
|
||||
add_header Cache-Control 'no-store';
|
||||
}
|
||||
location = / {
|
||||
internal;
|
||||
add_header Cache-Control 'no-store';
|
||||
}
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue