Commit f7f1ec72 authored by huanglu's avatar huanglu

feat: docker

parent 3c79f34a
......@@ -16,10 +16,10 @@ export default (appInfo: EggAppInfo) => {
'.nj': 'nunjucks',
},
};
const redis = {
host: '192.168.32.32',
port: 6379,
};
// const redis = {
// host: '192.168.32.32',
// port: 6379,
// };
const io = {
init: { wsEngine: 'ws' },
namespace: {
......@@ -32,7 +32,7 @@ export default (appInfo: EggAppInfo) => {
const data = qs.parse(req.url.split('?')[1]);
return data.userId || new Date().getTime().toFixed(0);
},
redis,
// redis,
};
const cors = {
......@@ -65,7 +65,6 @@ export default (appInfo: EggAppInfo) => {
view,
io,
jwt,
redis,
cors,
onerror,
security: {
......
......@@ -20,7 +20,7 @@
"autod": "autod",
"lint": "eslint . --ext .ts",
"clean": "ets clean",
"deploy": "docker build -f -t geek-socket-node"
"deploy": "docker build -f -t geek-socket-node && docker run geek-socket-node -p 3008:3008 -itd"
},
"dependencies": {
"egg": "^2.6.1",
......
......@@ -18,7 +18,6 @@ import 'egg-view-nunjucks';
import 'egg-socket.io';
import 'egg-redis';
import 'egg-cors';
import 'egg-mongoose';
import 'egg-jwt';
import { EggPluginItem } from 'egg';
declare module 'egg' {
......@@ -39,7 +38,6 @@ declare module 'egg' {
io?: EggPluginItem;
redis?: EggPluginItem;
cors?: EggPluginItem;
mongoose?: EggPluginItem;
jwt?: EggPluginItem;
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment