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