From c0bb6cddf419ae19dbb52b2050e615e117f82a55 Mon Sep 17 00:00:00 2001 From: whyour Date: Thu, 18 Mar 2021 11:31:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9dockerfile=E5=92=8C=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E8=B7=B3=E8=BD=AC=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.example | 4 ++-- docker/Dockerfile | 7 +++++-- src/layouts/index.tsx | 14 +++++++------- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.env.example b/.env.example index b54c315d..4e961a4e 100644 --- a/.env.example +++ b/.env.example @@ -1,8 +1,8 @@ MONGODB_URI='mongodb://' YIYAN_MONGODB_URI='' -PORT=8080 +PORT=5600 LOG_LEVEL='debug' -SECRET='test' +SECRET='whyour' diff --git a/docker/Dockerfile b/docker/Dockerfile index 57f0038b..0102fb1f 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,8 +1,8 @@ FROM node:lts-alpine LABEL maintainer="whyour" -ARG JD_BASE_URL=https://github.com/whyour/qinglong +ARG JD_BASE_URL=https://github.com.cnpmjs.org/whyour/qinglong ARG JD_BASE_BRANCH=master -ARG JD_SCRIPTS_URL=https://github.com/RikudouPatrickstar/jd_scripts +ARG JD_SCRIPTS_URL=https://github.com.cnpmjs.org/RikudouPatrickstar/jd_scripts ARG JD_SCRIPTS_BRANCH=master ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ LANG=zh_CN.UTF-8 \ @@ -27,11 +27,14 @@ RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ && echo "Asia/Shanghai" > /etc/timezone \ && touch ~/.bashrc \ + && mkdir /run/nginx \ && git clone -b ${JD_BASE_BRANCH} ${JD_BASE_URL} ${JD_DIR} \ && cd ${JD_DIR} \ + && cp -f .env.example .env \ && curl -o- -L https://yarnpkg.com/install.sh | bash \ && yarn install \ && yarn build \ + && yarn build-back \ && git clone -b ${JD_SCRIPTS_BRANCH} ${JD_SCRIPTS_URL} ${JD_DIR}/scripts \ && cd ${JD_DIR}/scripts \ && npm install \ diff --git a/src/layouts/index.tsx b/src/layouts/index.tsx index 1c0d70ad..3a240827 100644 --- a/src/layouts/index.tsx +++ b/src/layouts/index.tsx @@ -9,7 +9,7 @@ import ProLayout, { import defaultProps from './defaultProps'; import { Link, history } from 'umi'; import config from '@/utils/config'; -import 'codemirror/mode/shell/shell.js' +import 'codemirror/mode/shell/shell.js'; import './index.less'; export default function (props: any) { @@ -21,7 +21,7 @@ export default function (props: any) { }, []); useEffect(() => { if (props.location.pathname === '/') { - history.push('/config'); + history.push('/cookie'); } }, [props.location.pathname]); if (props.location.pathname === '/login') { @@ -41,11 +41,11 @@ export default function (props: any) { } return {defaultDom}; }} - // rightContentRender={() => ( - //
- // } /> - //
- // )} + // rightContentRender={() => ( + //
+ // } /> + //
+ // )} {...defaultProps} > {props.children}