Commit d4298051 authored by Reza Sahebgharan's avatar Reza Sahebgharan

feat(remove prerender and update docker-compose): remove prerender and update docker-compose

parent 514e0875
Pipeline #1108 passed with stage
in 41 minutes and 17 seconds
...@@ -45,6 +45,8 @@ services: ...@@ -45,6 +45,8 @@ services:
MONGO_URL: mongodb://mongo-windows:27017/karname MONGO_URL: mongodb://mongo-windows:27017/karname
PORT: 3000 PORT: 3000
METEOR_SETTINGS: '{"worklistUrl":"http://karname-broker","databusUrl":"http://databus"}' METEOR_SETTINGS: '{"worklistUrl":"http://karname-broker","databusUrl":"http://databus"}'
volumes:
- D:\data\logs:C:\app\programs\server\assets\app\logs
networks: networks:
default: default:
...@@ -55,18 +57,18 @@ networks: ...@@ -55,18 +57,18 @@ networks:
- navigate to Drive D and create a folder called "data" - navigate to Drive D and create a folder called "data"
* it is better to do not choose drive c * it is better to do not choose drive c
- navigate to D:/data and create a folder called "db" - navigate to D:/data and create a folder called "db" and also create a folder called "logs"
- if you choose drive other than drive D please edit above yaml file ***volumes*** section under ***mongo*** service: - if you choose drive other than drive D please edit above yaml file ***volumes*** section under ***mongo*** service:
for example if you choose drive E for creating folder "db" at previous step, change for example if you choose drive E for creating folder "db" at previous step, change
``` ```
volumes: volumes:
- D:\data\db:C:\data\db - D:\data\logs:C:\app\programs\server\assets\app\logs
``` ```
into into
``` ```
volumes: volumes:
- E:\data\db:C:\data\db - E:\data\logs:C:\app\programs\server\assets\app\logs
``` ```
- open CMD - open CMD
...@@ -79,6 +81,6 @@ networks: ...@@ -79,6 +81,6 @@ networks:
- run following command: - run following command:
docker-compose up -d --force-recreate docker-compose pull app&&docker-compose up -d --force-recreate
- goto localhost - goto localhost
\ No newline at end of file
...@@ -16,6 +16,8 @@ services: ...@@ -16,6 +16,8 @@ services:
MONGO_URL: mongodb://mongo-windows:27017/karname MONGO_URL: mongodb://mongo-windows:27017/karname
PORT: 80 PORT: 80
METEOR_SETTINGS: '{"worklistUrl":"http://karname-broker","databusUrl":"http://databus"}' METEOR_SETTINGS: '{"worklistUrl":"http://karname-broker","databusUrl":"http://databus"}'
volumes:
- C:\karnameapp\logs:C:\app\programs\server\assets\app\logs
# mongo: # mongo:
# container_name: mongo-windows # container_name: mongo-windows
# image: repo.marcopacs.com/karname/mongo-windows # image: repo.marcopacs.com/karname/mongo-windows
......
...@@ -38,10 +38,11 @@ Meteor.methods({ ...@@ -38,10 +38,11 @@ Meteor.methods({
return true return true
} catch (e) { } catch (e) {
log.error("getBrands Error", e, Meteor.user().username); log.error("getBrands Error", e, Meteor.user().username);
return false; throw new Meteor.Error(500, "error");
} }
} else { } else {
log.error("getBrands() => no loggined user for getBrands"); log.error("getBrands() => no loggined user for getBrands");
throw new Meteor.Error(500, "error");
} }
}, },
"getBrandsName" () { "getBrandsName" () {
...@@ -56,7 +57,7 @@ Meteor.methods({ ...@@ -56,7 +57,7 @@ Meteor.methods({
}) })
} catch (e) { } catch (e) {
// Got a network error, timeout, or HTTP error in the 400 or 500 range. // Got a network error, timeout, or HTTP error in the 400 or 500 range.
return false; throw new Meteor.Error(500, "error");
} }
} }
......
...@@ -6,7 +6,7 @@ import DeviceMap from '../collections/devicemap.js'; ...@@ -6,7 +6,7 @@ import DeviceMap from '../collections/devicemap.js';
import { Logger } from 'meteor/ostrio:logger'; import { Logger } from 'meteor/ostrio:logger';
import { LoggerFile } from 'meteor/ostrio:loggerfile'; import { LoggerFile } from 'meteor/ostrio:loggerfile';
debugger
var log = new Logger(); var log = new Logger();
(new LoggerFile(log)).enable(); (new LoggerFile(log)).enable();
...@@ -29,7 +29,7 @@ Meteor.methods({ ...@@ -29,7 +29,7 @@ Meteor.methods({
return true return true
} catch (e) { } catch (e) {
log.error(`createClient() => error in create client`, e, Meteor.user().username) log.error(`createClient() => error in create client`, e, Meteor.user().username)
return false; throw new Meteor.Error(500, "error");
} }
} }
}, },
...@@ -51,7 +51,7 @@ Meteor.methods({ ...@@ -51,7 +51,7 @@ Meteor.methods({
return true return true
} catch (e) { } catch (e) {
log.error(`editClient() => error in edit client`, e, Meteor.user().username) log.error(`editClient() => error in edit client`, e, Meteor.user().username)
return false; throw new Meteor.Error(500, "error");
} }
} }
}, },
...@@ -84,7 +84,7 @@ Meteor.methods({ ...@@ -84,7 +84,7 @@ Meteor.methods({
return true return true
} catch (e) { } catch (e) {
log.error(`deleteClient() => error in delete client`, e, Meteor.user().username) log.error(`deleteClient() => error in delete client`, e, Meteor.user().username)
return false; throw new Meteor.Error(500, "error");
} }
} }
}, },
......
...@@ -27,7 +27,7 @@ Meteor.methods({ ...@@ -27,7 +27,7 @@ Meteor.methods({
return true return true
} catch (e) { } catch (e) {
log.error(`createDeviceMap() => error in create DeviceMap`, e, Meteor.user().username) log.error(`createDeviceMap() => error in create DeviceMap`, e, Meteor.user().username)
return false; throw new Meteor.Error(500, "error");
} }
} }
}, },
...@@ -50,7 +50,7 @@ Meteor.methods({ ...@@ -50,7 +50,7 @@ Meteor.methods({
return true return true
} catch (e) { } catch (e) {
log.error(`editDevicemap() => error in edit devicemap`, e, Meteor.user().username); log.error(`editDevicemap() => error in edit devicemap`, e, Meteor.user().username);
return false; throw new Meteor.Error(500, "error");
} }
} }
}, },
...@@ -72,7 +72,7 @@ Meteor.methods({ ...@@ -72,7 +72,7 @@ Meteor.methods({
return true return true
} catch (e) { } catch (e) {
log.error(`deleteDevicemap() => error in delete devicemap`, e, Meteor.user().username); log.error(`deleteDevicemap() => error in delete devicemap`, e, Meteor.user().username);
return false; throw new Meteor.Error(500, "error");
} }
} }
}, },
......
...@@ -26,7 +26,7 @@ Meteor.methods({ ...@@ -26,7 +26,7 @@ Meteor.methods({
return true return true
} catch (e) { } catch (e) {
log.error(`createHisLink() => error in create HisLink`, e, Meteor.user().username); log.error(`createHisLink() => error in create HisLink`, e, Meteor.user().username);
return false; throw new Meteor.Error(500, "error");
} }
} }
}, },
...@@ -48,7 +48,7 @@ Meteor.methods({ ...@@ -48,7 +48,7 @@ Meteor.methods({
return true return true
} catch (e) { } catch (e) {
log.error(`editHisLink() => error in edit HisLink`, e, Meteor.user().username); log.error(`editHisLink() => error in edit HisLink`, e, Meteor.user().username);
return false; throw new Meteor.Error(500, "error");
} }
} }
}, },
...@@ -76,7 +76,7 @@ Meteor.methods({ ...@@ -76,7 +76,7 @@ Meteor.methods({
return true return true
} catch (e) { } catch (e) {
log.error(`deleteHisLink() => error in delete hislink`, e, Meteor.user().username) log.error(`deleteHisLink() => error in delete hislink`, e, Meteor.user().username)
return e.reason; throw new Meteor.Error(500, "error");
} }
} }
}, },
...@@ -98,7 +98,7 @@ Meteor.methods({ ...@@ -98,7 +98,7 @@ Meteor.methods({
return true return true
} catch (e) { } catch (e) {
log.error(`activeHisLink() => error in active hislink`, e, Meteor.user().username) log.error(`activeHisLink() => error in active hislink`, e, Meteor.user().username)
return false; throw new Meteor.Error(500, "error");
} }
} }
}, },
...@@ -120,7 +120,7 @@ Meteor.methods({ ...@@ -120,7 +120,7 @@ Meteor.methods({
return true return true
} catch (e) { } catch (e) {
log.error(`deactiveHisLink() => error in deactive hislink`, e, Meteor.user().username) log.error(`deactiveHisLink() => error in deactive hislink`, e, Meteor.user().username)
return false; throw new Meteor.Error(500, "error");
} }
} }
}, },
......
...@@ -26,7 +26,7 @@ Meteor.methods({ ...@@ -26,7 +26,7 @@ Meteor.methods({
return true return true
} catch (e) { } catch (e) {
log.error(`createUser() => error creating user at meteor`, e, Meteor.user().username); log.error(`createUser() => error creating user at meteor`, e, Meteor.user().username);
return false; throw new Meteor.Error("error");
} }
} }
}, },
...@@ -41,7 +41,7 @@ Meteor.methods({ ...@@ -41,7 +41,7 @@ Meteor.methods({
} catch (e) { } catch (e) {
log.error(`editUser() => error editing user`, e, Meteor.user().username); log.error(`editUser() => error editing user`, e, Meteor.user().username);
return false; throw new Meteor.Error("error");
} }
} }
}, },
...@@ -55,7 +55,7 @@ Meteor.methods({ ...@@ -55,7 +55,7 @@ Meteor.methods({
return true return true
} catch (e) { } catch (e) {
log.error(`setPassword() => error setPassword`, e, Meteor.user().username); log.error(`setPassword() => error setPassword`, e, Meteor.user().username);
return false; throw new Meteor.Error("error");
} }
} }
}, },
...@@ -71,7 +71,7 @@ Meteor.methods({ ...@@ -71,7 +71,7 @@ Meteor.methods({
} catch (e) { } catch (e) {
log.error(`deleteUser() => error user removing`, e, Meteor.user().username); log.error(`deleteUser() => error user removing`, e, Meteor.user().username);
return false; throw new Meteor.Error("error");
} }
} }
}, },
...@@ -86,7 +86,7 @@ Meteor.methods({ ...@@ -86,7 +86,7 @@ Meteor.methods({
return true return true
} catch (e) { } catch (e) {
log.error(`editUserProfile() => error user profile editing`, e, Meteor.user().username); log.error(`editUserProfile() => error user profile editing`, e, Meteor.user().username);
return false; throw new Meteor.Error("error");
} }
} }
} }
......
...@@ -60,7 +60,7 @@ Meteor.methods({ ...@@ -60,7 +60,7 @@ Meteor.methods({
return true return true
} catch (e) { } catch (e) {
log.error(`Fetchworklist() => error fetching worklist`, e, Meteor.user().username); log.error(`Fetchworklist() => error fetching worklist`, e, Meteor.user().username);
return false; throw new Meteor.Error("error");
} }
} }
}, },
...@@ -135,7 +135,7 @@ Meteor.methods({ ...@@ -135,7 +135,7 @@ Meteor.methods({
} }
} catch (e) { } catch (e) {
log.error(`EditworklistItem() => error editing worklist`, e, Meteor.user().username); log.error(`EditworklistItem() => error editing worklist`, e, Meteor.user().username);
return false; throw new Meteor.Error("error");
} }
}, },
"Register" (item) { "Register" (item) {
...@@ -162,7 +162,7 @@ Meteor.methods({ ...@@ -162,7 +162,7 @@ Meteor.methods({
} }
} catch (e) { } catch (e) {
log.error(`EditworklistItem() => error editing worklist`, e, Meteor.user().username); log.error(`EditworklistItem() => error editing worklist`, e, Meteor.user().username);
return false; throw new Meteor.Error("error");
} }
} }
......
...@@ -51,15 +51,15 @@ Meteor.startup(() => { ...@@ -51,15 +51,15 @@ Meteor.startup(() => {
}); });
function onRoute(req, res, next) { // function onRoute(req, res, next) {
res.writeHead(307, { 'Location': "/landing.html" }); // res.writeHead(307, { 'Location': "/landing.html" });
res.end(); // res.end();
} // }
const middleWare = ConnectRoute(function(router) { // const middleWare = ConnectRoute(function(router) {
router.get('/', onRoute); // router.get('/', onRoute);
}); // });
WebApp.connectHandlers // WebApp.connectHandlers
.use(middleWare); // .use(middleWare);
\ No newline at end of file \ 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