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