Commit b8159c9f authored by Reza Sahebgharan's avatar Reza Sahebgharan

create DockerFile and docker-compose.yml WAD-6915

parent c0f88371
......@@ -11,6 +11,7 @@
]
],
"plugins": [
[
"@babel/plugin-transform-async-to-generator"
],
......
node_modules/
.meteor/local/
.vscode/
......@@ -11,8 +11,8 @@ reactive-var@1.0.11 # Reactive variable for tracker
tracker@1.2.0 # Meteor's client-side reactive programming library
shell-server@0.4.0 # Server-side component of the `meteor shell` command
http
accounts-password
ardatan:webpack
ardatan:webpack-dev-middleware
http
This diff is collapsed.
import Login from '../views/Login.vue';
import Home from '../views/Home.vue';
import Register from '../views/Register.vue';
import ChangePassword from '../views/ChangePassword.vue';
import Main from '../views/Main.vue';
// const Login = () =>
// import ('../views/Login.vue')
import EditWorkList from '../components/EditWorkList.vue';
import WorkList from '../components/Worklist.vue';
// const Home = () =>
// import ('../views/Home.vue')
// const Register = () =>
// import ('../views/Register.vue')
// const ChangePassword = () =>
// import ('../views/ChangePassword.vue')
// const Main = () =>
// import ('../views/Main.vue')
// const EditWorkList = () =>
// import ('../components/EditWorkList.vue')
// const WorkList = () =>
// import ('../components/Worklist.vue')
// import Login from '../views/Login.vue';
// import Home from '../views/Home.vue';
// import Register from '../views/Register.vue';
// import ChangePassword from '../views/ChangePassword.vue';
// import Main from '../views/Main.vue';
// import EditWorkList from '../components/EditWorkList.vue';
// import WorkList from '../components/Worklist.vue';
const routes = [{
path: '/',
component: Home,
component: () =>
import ('../views/Home.vue'),
name: 'Home'
},
{
path: '/signin',
component: Login,
component: () =>
import ('../views/Login.vue'),
name: 'signin'
},
{
path: '/signup',
component: Register,
component: () =>
import ('../views/Register.vue'),
name: 'signup'
},
{
path: '/changePassword',
component: ChangePassword,
component: () =>
import ('../views/ChangePassword.vue'),
name: 'changePassword'
}, {
path: '/main',
component: Main,
component: () =>
import ('../views/Main.vue'),
name: 'main',
children: [{
path: "worklist",
name: "worklist",
components: {
default: WorkList,
edit_worklist: EditWorkList
default: () =>
import ('../components/Worklist.vue'),
edit_worklist: () =>
import ('../components/EditWorkList.vue')
}
}]
}
......
version: '3'
services:
app:
restart: on-failure
build:
context: .
dockerfile: docker/devel/Dockerfile
image: karname/app:1.0
ports:
- '5050:3000'
depends_on:
- mongo
links:
- mongo
environment:
ROOT_URL: ${APP_ROOT_URL:-http://localhost}
MONGO_URL: mongodb://mongo:27017/karname
PORT: 3000
METEOR_SETTINGS: '{"worklistUrl":"http://192.168.0.156"}'
mongo:
image: mongo:latest
command:
- --storageEngine=wiredTiger
volumes:
- data:/data/db
volumes:
data:
\ No newline at end of file
# The tag here should match the Meteor version of your app, per .meteor/release
FROM geoffreybooth/meteor-base:1.8.1
WORKDIR $APP_SOURCE_FOLDER/
# Copy app package.json and package-lock.json into container
COPY ./package*.json $APP_SOURCE_FOLDER/
RUN bash $SCRIPTS_FOLDER/build-app-npm-dependencies.sh
# Copy app source into container
COPY . $APP_SOURCE_FOLDER/
# COPY ./docker/build-meteor-bundle.sh $SCRIPTS_FOLDER/
RUN bash $SCRIPTS_FOLDER/build-meteor-bundle.sh
# Rather than Node 8 latest (Alpine), you can also use the specific version of Node expected by your Meteor release, per https://docs.meteor.com/changelog.html
FROM node:12-alpine
ENV APP_BUNDLE_FOLDER /opt/bundle
ENV SCRIPTS_FOLDER /docker
# Install OS build dependencies, which we remove later after we’ve compiled native Node extensions
RUN apk --no-cache --virtual .node-gyp-compilation-dependencies add \
g++ \
make \
python \
# And runtime dependencies, which we keep
&& apk --no-cache add \
bash \
ca-certificates
# Copy in entrypoint
COPY --from=0 $SCRIPTS_FOLDER $SCRIPTS_FOLDER/
# Copy in app bundle
COPY --from=0 $APP_BUNDLE_FOLDER/bundle $APP_BUNDLE_FOLDER/bundle/
RUN bash $SCRIPTS_FOLDER/build-meteor-npm-dependencies.sh --build-from-source \
&& apk del .node-gyp-compilation-dependencies
# Start app
ENTRYPOINT ["/docker/entrypoint.sh"]
CMD ["node", "main.js"]
\ No newline at end of file
# The tag here should match the Meteor version of your app, per .meteor/release
FROM geoffreybooth/meteor-base:1.8.1
WORKDIR $APP_SOURCE_FOLDER/
# Copy app package.json and package-lock.json into container
COPY ./package*.json $APP_SOURCE_FOLDER/
RUN bash $SCRIPTS_FOLDER/build-app-npm-dependencies.sh
# Copy app source into container
COPY . $APP_SOURCE_FOLDER/
# COPY ./docker/build-meteor-bundle.sh $SCRIPTS_FOLDER/
RUN bash $SCRIPTS_FOLDER/build-meteor-bundle.sh
# Rather than Node 8 latest (Alpine), you can also use the specific version of Node expected by your Meteor release, per https://docs.meteor.com/changelog.html
FROM node:12-alpine
ENV APP_BUNDLE_FOLDER /opt/bundle
ENV SCRIPTS_FOLDER /docker
# Install OS build dependencies, which we remove later after we’ve compiled native Node extensions
RUN apk --no-cache --virtual .node-gyp-compilation-dependencies add \
g++ \
make \
python \
# And runtime dependencies, which we keep
&& apk --no-cache add \
bash \
ca-certificates
# Copy in entrypoint
COPY --from=0 $SCRIPTS_FOLDER $SCRIPTS_FOLDER/
# Copy in app bundle
COPY --from=0 $APP_BUNDLE_FOLDER/bundle $APP_BUNDLE_FOLDER/bundle/
RUN bash $SCRIPTS_FOLDER/build-meteor-npm-dependencies.sh --build-from-source \
&& apk del .node-gyp-compilation-dependencies
# Start app
ENTRYPOINT ["/docker/entrypoint.sh"]
CMD ["node", "main.js"]
\ No newline at end of file
......@@ -11,7 +11,7 @@ Meteor.methods({
this.unblock();
if (this.userId) {
try {
const result = HTTP.call('GET', `http://192.168.0.156/Broker/HISIntegration.svc/rest/getdevicecodes`);
const result = HTTP.call('GET', `${Meteor.settings.worklistUrl}/Broker/HISIntegration.svc/rest/getdevicecodes`);
let deviceCodeHttpResult = JSON.parse(result.content);
DeviceCode.remove({});
deviceCodeHttpResult.Devices.forEach((device) => {
......
......@@ -20,7 +20,7 @@ Meteor.methods({
this.unblock();
if (this.userId) {
try {
const result = HTTP.call('GET', `http://192.168.0.156/Broker/HISIntegration.svc/rest/Fetchworklist/${devicemap}`);
const result = HTTP.call('GET', `${Meteor.settings.worklistUrl}/Broker/HISIntegration.svc/rest/Fetchworklist/${devicemap}`);
let worklistHttp = JSON.parse(result.content);
Worklist.remove({ _userid: this.userId, _devicemap: devicemap });
worklistHttp.WorkListItems.forEach((patient) => {
......@@ -84,24 +84,26 @@ Meteor.methods({
// "StudyInstanceUID": "1.3.12.2.1107.5.2.30.26719.6.8122118808"
// }
// try {
debugger;
delete item._id;
workListItemSchema.validate(item);
if (this.userId) {
delete item._id;
workListItemSchema.validate(item);
var options = {
data: item,
headers: {
'content-type': 'application/json',
'Accept': 'application/json'
var options = {
data: item,
headers: {
'content-type': 'application/json',
'Accept': 'application/json'
}
}
}
const result = HTTP.call('POST', `http://192.168.0.156/Broker/HISIntegration.svc/rest/EditworklistItem`, options);
// console.log(result);
const result = HTTP.call('POST', `${Meteor.settings.worklistUrl}/Broker/HISIntegration.svc/rest/EditworklistItem`, options);
// console.log(result);
let update = Worklist.update({ AdmissionID: item.AdmissionID }, { $set: JSON.parse(result.content) });
console.log(update);
return true;
}
let update = Worklist.update({ AdmissionID: item.AdmissionID }, { $set: JSON.parse(result.content) });
console.log(update);
return true;
// }
// catch (e) {
......
{
"worklistUrl": "http://192.168.0.156"
}
\ No newline at end of file
......@@ -44,7 +44,12 @@ const clientConfig = {
rules: [{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/
exclude: /node_modules/,
options: {
plugins: [
"@babel/plugin-syntax-dynamic-import"
]
}
},
{
test: /\.vue$/,
......
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