Commit f7f1ec72 authored by huanglu's avatar huanglu

feat: docker

parent 3c79f34a
...@@ -16,10 +16,10 @@ export default (appInfo: EggAppInfo) => { ...@@ -16,10 +16,10 @@ export default (appInfo: EggAppInfo) => {
'.nj': 'nunjucks', '.nj': 'nunjucks',
}, },
}; };
const redis = { // const redis = {
host: '192.168.32.32', // host: '192.168.32.32',
port: 6379, // port: 6379,
}; // };
const io = { const io = {
init: { wsEngine: 'ws' }, init: { wsEngine: 'ws' },
namespace: { namespace: {
...@@ -32,7 +32,7 @@ export default (appInfo: EggAppInfo) => { ...@@ -32,7 +32,7 @@ export default (appInfo: EggAppInfo) => {
const data = qs.parse(req.url.split('?')[1]); const data = qs.parse(req.url.split('?')[1]);
return data.userId || new Date().getTime().toFixed(0); return data.userId || new Date().getTime().toFixed(0);
}, },
redis, // redis,
}; };
const cors = { const cors = {
...@@ -65,7 +65,6 @@ export default (appInfo: EggAppInfo) => { ...@@ -65,7 +65,6 @@ export default (appInfo: EggAppInfo) => {
view, view,
io, io,
jwt, jwt,
redis,
cors, cors,
onerror, onerror,
security: { security: {
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
"autod": "autod", "autod": "autod",
"lint": "eslint . --ext .ts", "lint": "eslint . --ext .ts",
"clean": "ets clean", "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": { "dependencies": {
"egg": "^2.6.1", "egg": "^2.6.1",
......
...@@ -18,7 +18,6 @@ import 'egg-view-nunjucks'; ...@@ -18,7 +18,6 @@ import 'egg-view-nunjucks';
import 'egg-socket.io'; import 'egg-socket.io';
import 'egg-redis'; import 'egg-redis';
import 'egg-cors'; import 'egg-cors';
import 'egg-mongoose';
import 'egg-jwt'; import 'egg-jwt';
import { EggPluginItem } from 'egg'; import { EggPluginItem } from 'egg';
declare module 'egg' { declare module 'egg' {
...@@ -39,7 +38,6 @@ declare module 'egg' { ...@@ -39,7 +38,6 @@ declare module 'egg' {
io?: EggPluginItem; io?: EggPluginItem;
redis?: EggPluginItem; redis?: EggPluginItem;
cors?: EggPluginItem; cors?: EggPluginItem;
mongoose?: EggPluginItem;
jwt?: 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