mirror of
https://github.com/QingdaoU/OnlineJudgeFE.git
synced 2024-12-28 23:41:47 +00:00
feat: split backend
This commit is contained in:
parent
44fa4744c2
commit
b6f67f0832
27
Dockerfile
Normal file
27
Dockerfile
Normal file
@ -0,0 +1,27 @@
|
||||
FROM node:16-alpine AS builder
|
||||
|
||||
ENV NODE_ENV=production
|
||||
WORKDIR /app
|
||||
|
||||
RUN apk add --no-cache git
|
||||
|
||||
COPY .git .git/
|
||||
COPY package.json yarn.lock ./
|
||||
RUN yarn install
|
||||
COPY build/ build/
|
||||
COPY config/ config/
|
||||
COPY deploy/ deploy/
|
||||
COPY src/ src/
|
||||
COPY static/ static/
|
||||
COPY .babelrc .postcssrc.js ./
|
||||
RUN <<EOS
|
||||
set -ex
|
||||
yarn run build:dll
|
||||
yarn run build
|
||||
EOS
|
||||
|
||||
FROM caddy:2.7.6
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /app/dist/ ./
|
@ -20,7 +20,7 @@ module.exports = {
|
||||
adminTemplate: path.resolve(__dirname, '../src/pages/admin/index.html'),
|
||||
assetsRoot: path.resolve(__dirname, '../dist'),
|
||||
assetsSubDirectory: 'static',
|
||||
assetsPublicPath: '/__STATIC_CDN_HOST__/',
|
||||
assetsPublicPath: '/',
|
||||
productionSourceMap: process.env.USE_SENTRY === '1',
|
||||
// Gzip off by default as many popular static hosts such as
|
||||
// Surge or Netlify already gzip all static assets for you.
|
||||
|
@ -9,13 +9,6 @@
|
||||
<link rel="shortcut icon" href="/public/website/favicon.ico">
|
||||
|
||||
<link href="/static/css/loader.css" rel="stylesheet">
|
||||
<script>
|
||||
// IE 10 and earlier
|
||||
if (window.navigator.userAgent.indexOf('MSIE ') > 0 &&
|
||||
window.confirm('Your browser is not supported, click \'OK\' to update')) {
|
||||
window.location = 'http://outdatedbrowser.com'
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app-loader">
|
||||
|
Loading…
Reference in New Issue
Block a user