修改dockerfile和默认跳转路径

This commit is contained in:
whyour 2021-03-18 11:31:49 +08:00
parent 4555a24434
commit c0bb6cddf4
3 changed files with 14 additions and 11 deletions

View File

@ -1,8 +1,8 @@
MONGODB_URI='mongodb://'
YIYAN_MONGODB_URI=''
PORT=8080
PORT=5600
LOG_LEVEL='debug'
SECRET='test'
SECRET='whyour'

View File

@ -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 \

View File

@ -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') {