Commit b8159c9f authored by Reza Sahebgharan's avatar Reza Sahebgharan

create DockerFile and docker-compose.yml WAD-6915

parent c0f88371
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
] ]
], ],
"plugins": [ "plugins": [
[ [
"@babel/plugin-transform-async-to-generator" "@babel/plugin-transform-async-to-generator"
], ],
......
node_modules/
.meteor/local/
.vscode/
...@@ -11,8 +11,8 @@ reactive-var@1.0.11 # Reactive variable for tracker ...@@ -11,8 +11,8 @@ reactive-var@1.0.11 # Reactive variable for tracker
tracker@1.2.0 # Meteor's client-side reactive programming library tracker@1.2.0 # Meteor's client-side reactive programming library
shell-server@0.4.0 # Server-side component of the `meteor shell` command shell-server@0.4.0 # Server-side component of the `meteor shell` command
http
accounts-password accounts-password
ardatan:webpack ardatan:webpack
ardatan:webpack-dev-middleware ardatan:webpack-dev-middleware
http
This diff is collapsed.
import Login from '../views/Login.vue'; // const Login = () =>
import Home from '../views/Home.vue'; // import ('../views/Login.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 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 = [{ const routes = [{
path: '/', path: '/',
component: Home, component: () =>
import ('../views/Home.vue'),
name: 'Home' name: 'Home'
}, },
{ {
path: '/signin', path: '/signin',
component: Login, component: () =>
import ('../views/Login.vue'),
name: 'signin' name: 'signin'
}, },
{ {
path: '/signup', path: '/signup',
component: Register, component: () =>
import ('../views/Register.vue'),
name: 'signup' name: 'signup'
}, },
{ {
path: '/changePassword', path: '/changePassword',
component: ChangePassword, component: () =>
import ('../views/ChangePassword.vue'),
name: 'changePassword' name: 'changePassword'
}, { }, {
path: '/main', path: '/main',
component: Main, component: () =>
import ('../views/Main.vue'),
name: 'main', name: 'main',
children: [{ children: [{
path: "worklist", path: "worklist",
name: "worklist", name: "worklist",
components: { components: {
default: WorkList, default: () =>
edit_worklist: EditWorkList 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({ ...@@ -11,7 +11,7 @@ Meteor.methods({
this.unblock(); this.unblock();
if (this.userId) { if (this.userId) {
try { 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); let deviceCodeHttpResult = JSON.parse(result.content);
DeviceCode.remove({}); DeviceCode.remove({});
deviceCodeHttpResult.Devices.forEach((device) => { deviceCodeHttpResult.Devices.forEach((device) => {
......
...@@ -20,7 +20,7 @@ Meteor.methods({ ...@@ -20,7 +20,7 @@ Meteor.methods({
this.unblock(); this.unblock();
if (this.userId) { if (this.userId) {
try { 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); let worklistHttp = JSON.parse(result.content);
Worklist.remove({ _userid: this.userId, _devicemap: devicemap }); Worklist.remove({ _userid: this.userId, _devicemap: devicemap });
worklistHttp.WorkListItems.forEach((patient) => { worklistHttp.WorkListItems.forEach((patient) => {
...@@ -84,7 +84,7 @@ Meteor.methods({ ...@@ -84,7 +84,7 @@ Meteor.methods({
// "StudyInstanceUID": "1.3.12.2.1107.5.2.30.26719.6.8122118808" // "StudyInstanceUID": "1.3.12.2.1107.5.2.30.26719.6.8122118808"
// } // }
// try { // try {
debugger; if (this.userId) {
delete item._id; delete item._id;
workListItemSchema.validate(item); workListItemSchema.validate(item);
...@@ -96,12 +96,14 @@ Meteor.methods({ ...@@ -96,12 +96,14 @@ Meteor.methods({
} }
} }
const result = HTTP.call('POST', `http://192.168.0.156/Broker/HISIntegration.svc/rest/EditworklistItem`, options); const result = HTTP.call('POST', `${Meteor.settings.worklistUrl}/Broker/HISIntegration.svc/rest/EditworklistItem`, options);
// console.log(result); // console.log(result);
let update = Worklist.update({ AdmissionID: item.AdmissionID }, { $set: JSON.parse(result.content) }); let update = Worklist.update({ AdmissionID: item.AdmissionID }, { $set: JSON.parse(result.content) });
console.log(update); console.log(update);
return true; return true;
}
// } // }
// catch (e) { // catch (e) {
......
{
"worklistUrl": "http://192.168.0.156"
}
\ No newline at end of file
...@@ -44,7 +44,12 @@ const clientConfig = { ...@@ -44,7 +44,12 @@ const clientConfig = {
rules: [{ rules: [{
test: /\.js$/, test: /\.js$/,
loader: 'babel-loader', loader: 'babel-loader',
exclude: /node_modules/ exclude: /node_modules/,
options: {
plugins: [
"@babel/plugin-syntax-dynamic-import"
]
}
}, },
{ {
test: /\.vue$/, 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