update and add Dockerfile

2.0
adb-sh 2 years ago
parent 50aa4e5524
commit d65d6efb44

@ -0,0 +1,13 @@
FROM node:16-alpine AS builder
COPY ./ /home/node/app
WORKDIR /home/node/app
RUN npm ci && npm run build
FROM nginx:alpine
COPY --from=builder /home/node/app/dist /var/www/html
EXPOSE 8080

@ -0,0 +1,20 @@
version: '3'
networks:
web:
external: true
services:
frontend:
image: docker.cybre.town/adb/adb.sh
build:
dockerfile: ./Dockerfile
context: ./
labels:
- "traefik.enable=true"
- "traefik.http.routers.adb-sh.rule=Host(`adb.sh`)"
- "traefik.http.routers.adb-sh.entrypoints=https"
- "traefik.http.services.adb-sh.loadbalancer.server.port=8080"
- "traefik.http.routers.adb-sh.tls.certresolver=mytlschallenge"
- "traefik.docker.network=web"

@ -0,0 +1,86 @@
worker_processes auto;
worker_cpu_affinity auto;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
#daemon off;
events {
worker_connections 1024;
}
http {
# rewrite_log on;
include mime.types;
default_type application/json;
access_log /var/log/nginx/access.log;
sendfile on;
# tcp_nopush on;
keepalive_timeout 3;
# tcp_nodelay on;
# gzip on;
client_max_body_size 1m;
server {
listen 8080 default_server;
server_name _;
error_page 400 = @400;
location @400 { return 400 '{"status":400,"message":"Bad request"}\n'; }
error_page 401 = @401;
location @401 { return 401 '{"status":401,"message":"Unauthorized"}\n'; }
error_page 403 = @403;
location @403 { return 403 '{"status":403,"message":"Forbidden"}\n'; }
error_page 404 = @404;
location @404 { return 404 '{"status":404,"message":"Resource not found"}\n'; }
error_page 405 = @405;
location @405 { return 405 '{"status":405,"message":"Method not allowed"}\n'; }
error_page 408 = @408;
location @408 { return 408 '{"status":408,"message":"Request timeout"}\n'; }
error_page 413 = @413;
location @413 { return 413 '{"status":413,"message":"Payload too large"}\n'; }
error_page 414 = @414;
location @414 { return 414 '{"status":414,"message":"Request URI too large"}\n'; }
error_page 415 = @415;
location @415 { return 415 '{"status":415,"message":"Unsupported media type"}\n'; }
error_page 426 = @426;
location @426 { return 426 '{"status":426,"message":"HTTP request was sent to HTTPS port"}\n'; }
error_page 429 = @429;
location @429 { return 429 '{"status":429,"message":"API rate limit exceeded"}\n'; }
error_page 495 = @495;
location @495 { return 495 '{"status":495,"message":"Client certificate authentication error"}\n'; }
error_page 496 = @496;
location @496 { return 496 '{"status":496,"message":"Client certificate not presented"}\n'; }
error_page 497 = @497;
location @497 { return 497 '{"status":497,"message":"HTTP request was sent to mutual TLS port"}\n'; }
error_page 500 = @500;
location @500 { return 500 '{"status":500,"message":"Server error"}\n'; }
error_page 501 = @501;
location @501 { return 501 '{"status":501,"message":"Not implemented"}\n'; }
error_page 502 = @502;
location @502 { return 502 '{"status":502,"message":"Bad gateway"}\n'; }
location / {
index index.html;
root /var/www/html;
try_files $uri $uri/ /index.html;
}
}
}

1911
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -22,9 +22,9 @@
"dependencies": {
"@vuepress/plugin-search": "^1.9.7",
"@vuepress/theme-default": "^1.9.7",
"bootstrap": "^5.2.1",
"bootstrap": "^5.2.3",
"bootstrap-darkmode": "^5.0.1",
"bootstrap-icons": "^1.9.1",
"bootstrap-icons": "^1.10.2",
"vuepress-plugin-sitemap": "^2.3.1"
}
}

@ -40,18 +40,6 @@ module.exports = {
link: '/music',
},
],
sidebar: {
'/guide/': [
{
title: 'Guide',
collapsable: false,
children: [
'',
'using-vue',
]
}
],
}
},
plugins: {
'@vuepress/plugin-search': {},

Loading…
Cancel
Save