mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 20:36:40 +07:00
renamed app to www
This commit is contained in:
parent
3d79ea3f49
commit
8450856d45
3 changed files with 3 additions and 3 deletions
13
docker/www/Dockerfile
Normal file
13
docker/www/Dockerfile
Normal file
|
@ -0,0 +1,13 @@
|
|||
# stage1 as builder
|
||||
FROM node:10.13 as builder
|
||||
COPY package.json yarn.lock ./
|
||||
RUN yarn
|
||||
COPY . .
|
||||
RUN yarn build
|
||||
|
||||
FROM nginx:alpine
|
||||
COPY docker/www/nginx.conf /etc/nginx/nginx.conf
|
||||
RUN rm -rf /usr/share/nginx/html/*
|
||||
COPY --from=builder /dist /usr/share/nginx/html
|
||||
EXPOSE ${EXPOSE} 80
|
||||
ENTRYPOINT ["nginx", "-g", "daemon off;"]
|
46
docker/www/nginx.conf
Normal file
46
docker/www/nginx.conf
Normal file
|
@ -0,0 +1,46 @@
|
|||
worker_processes 4;
|
||||
|
||||
events { worker_connections 1024; }
|
||||
|
||||
http {
|
||||
server {
|
||||
listen 80;
|
||||
root /usr/share/nginx/html;
|
||||
include /etc/nginx/mime.types;
|
||||
|
||||
gzip on;
|
||||
gzip_min_length 1000;
|
||||
gzip_proxied expired no-cache no-store private auth;
|
||||
gzip_types text/plain application/xml application/javascript;
|
||||
|
||||
## All static files will be served directly.
|
||||
location ~* ^.+\.(?:css|cur|js|jpe?g|gif|htc|ico|png|xml|otf|ttf|eot|woff|woff2|svg)$ {
|
||||
access_log off;
|
||||
expires 30d;
|
||||
add_header Cache-Control public;
|
||||
gzip_static on;
|
||||
|
||||
## No need to bleed constant updates. Send the all shebang in one
|
||||
## fell swoop.
|
||||
tcp_nodelay off;
|
||||
|
||||
## Set the OS file cache.
|
||||
open_file_cache max=3000 inactive=120s;
|
||||
open_file_cache_valid 45s;
|
||||
open_file_cache_min_uses 2;
|
||||
open_file_cache_errors off;
|
||||
}
|
||||
|
||||
location / {
|
||||
gzip_static on;
|
||||
try_files $uri @index;
|
||||
}
|
||||
|
||||
location @index {
|
||||
add_header Cache-Control "no-store, no-cache, must-revalidate";
|
||||
expires -1;
|
||||
try_files /index.html =404;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue