mirror of
https://github.com/certd/certd.git
synced 2026-05-18 14:27:36 +08:00
chore: env
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
FROM registry.cn-shenzhen.aliyuncs.com/handsfree/node:16-alpine
|
FROM registry.cn-shenzhen.aliyuncs.com/handsfree/node:16-alpine
|
||||||
EXPOSE 7001
|
EXPOSE 7001
|
||||||
ENV NODE_ENV production
|
ENV NODE_ENV production
|
||||||
|
ENV MIDWAY_SERVER_ENV production
|
||||||
WORKDIR /app/
|
WORKDIR /app/
|
||||||
#RUN npm install cross-env -g --registry=https://registry.npmmirror.com
|
#RUN npm install cross-env -g --registry=https://registry.npmmirror.com
|
||||||
#RUN npm install pm2 -g --registry=https://registry.npmmirror.com
|
#RUN npm install pm2 -g --registry=https://registry.npmmirror.com
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ const development = {
|
|||||||
port: 7001,
|
port: 7001,
|
||||||
},
|
},
|
||||||
staticFile: {
|
staticFile: {
|
||||||
|
maxAge: 31536000,
|
||||||
|
buffer: true,
|
||||||
dirs: {
|
dirs: {
|
||||||
default: {
|
default: {
|
||||||
prefix: '/',
|
prefix: '/',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import { PreviewMiddleware } from './middleware/preview';
|
|||||||
import { AuthorityMiddleware } from './middleware/authority';
|
import { AuthorityMiddleware } from './middleware/authority';
|
||||||
import * as staticFile from '@midwayjs/static-file';
|
import * as staticFile from '@midwayjs/static-file';
|
||||||
import * as cron from './plugins/cron';
|
import * as cron from './plugins/cron';
|
||||||
|
import { logger } from './utils/logger';
|
||||||
|
|
||||||
@Configuration({
|
@Configuration({
|
||||||
imports: [koa, orm, cache, flyway, validateComp, cron, staticFile],
|
imports: [koa, orm, cache, flyway, validateComp, cron, staticFile],
|
||||||
@@ -54,5 +55,7 @@ export class ContainerLifeCycle {
|
|||||||
//授权处理
|
//授权处理
|
||||||
AuthorityMiddleware,
|
AuthorityMiddleware,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
logger.info('当前环境:', this.app.getEnv()); // prod
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user