From 979653b654754d2942a0348bbeac56efa9f2c3b6 Mon Sep 17 00:00:00 2001 From: mx <58824049+mx-alex@users.noreply.github.com> Date: Tue, 25 Feb 2020 16:22:26 +0200 Subject: [PATCH 1/5] Add files via upload --- Dockerfile | 24 ++++++++++++++++++++++++ Installer.cls | 32 ++++++++++++++++++++++++++++++++ docker-compose.yml | 14 ++++++++++++++ irissession.sh | 19 +++++++++++++++++++ 4 files changed, 89 insertions(+) create mode 100644 Dockerfile create mode 100644 Installer.cls create mode 100644 docker-compose.yml create mode 100644 irissession.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c446b3c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +ARG IMAGE=store/intersystems/irishealth:2019.3.0.308.0-community +ARG IMAGE=store/intersystems/iris-community:2019.3.0.309.0 +ARG IMAGE=store/intersystems/iris-community:2019.4.0.379.0 +ARG IMAGE=store/intersystems/iris-community:2020.1.0.199.0 +FROM $IMAGE + +USER root + +WORKDIR /opt/irisapp +RUN chown ${ISC_PACKAGE_MGRUSER}:${ISC_PACKAGE_IRISGROUP} /opt/irisapp + +USER irisowner + +COPY Installer.cls . +COPY src src +COPY irissession.sh / +SHELL ["/irissession.sh"] + +RUN \ + do $SYSTEM.OBJ.Load("Installer.cls", "ck") \ + set sc = ##class(App.Installer).setup() + +# bringing the standard shell back +SHELL ["/bin/bash", "-c"] diff --git a/Installer.cls b/Installer.cls new file mode 100644 index 0000000..91b0bd4 --- /dev/null +++ b/Installer.cls @@ -0,0 +1,32 @@ +Class App.Installer +{ + +XData setup +{ + + + + + + + + + + + + + + + + +} + +ClassMethod setup(ByRef pVars, pLogLevel As %Integer = 3, pInstaller As %Installer.Installer, pLogger As %Installer.AbstractLogger) As %Status [ CodeMode = objectgenerator, Internal ] +{ + #; Let XGL document generate code for this method. + Quit ##class(%Installer.Manifest).%Generate(%compiledclass, %code, "setup") +} + +} diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..67c28b6 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,14 @@ +version: '3.6' +services: + iris: + build: + context: . + dockerfile: Dockerfile + restart: always + ports: + - 51773 + - 52773 + - 53773 + volumes: + - ~/iris.key:/usr/irissys/mgr/iris.key + - ./:/irisdev/app \ No newline at end of file diff --git a/irissession.sh b/irissession.sh new file mode 100644 index 0000000..8f4a51d --- /dev/null +++ b/irissession.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +iris start $ISC_PACKAGE_INSTANCENAME quietly + +cat << EOF | iris session $ISC_PACKAGE_INSTANCENAME -U %SYS +do ##class(%SYSTEM.Process).CurrentDirectory("$PWD") +$@ +if '\$Get(sc) do ##class(%SYSTEM.Process).Terminate(, 1) +zn "%SYS" +do ##class(SYS.Container).QuiesceForBundling() +Do ##class(Security.Users).UnExpireUserPasswords("*") +halt +EOF + +exit=$? + +iris stop $ISC_PACKAGE_INSTANCENAME quietly + +exit $exit \ No newline at end of file From 65d89bde7e8ed85c650f43a1f5baf8054749eb61 Mon Sep 17 00:00:00 2001 From: mx <58824049+mx-alex@users.noreply.github.com> Date: Tue, 25 Feb 2020 16:23:34 +0200 Subject: [PATCH 2/5] Add files via upload --- .dockerignore | 2 ++ .gitattributes | 5 +++++ .gitignore | 3 +++ 3 files changed, 10 insertions(+) create mode 100644 .dockerignore create mode 100644 .gitattributes create mode 100644 .gitignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..c292b73 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +**/.DS_Store +.git \ No newline at end of file diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..0512189 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,5 @@ +*.sh text eol=lf +*.cls text eol=lf +*.mac text eol=lf +*.int text eol=lf +Dockerfil* text eol=lf \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e6aff51 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.DS_Store + + From 9fc195e9098dacd1d96b980bd399378ea6dd3abd Mon Sep 17 00:00:00 2001 From: mx <58824049+mx-alex@users.noreply.github.com> Date: Tue, 25 Feb 2020 16:27:52 +0200 Subject: [PATCH 3/5] Update README.md --- README.md | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/README.md b/README.md index 21be86e..18d2a82 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # mx -Now MS Excel and MUMPS database work together, all m-commands are located in cells of Excel +Now MS Excel and MUMPS database works together, all m-commands are located in cells of Excel How it works : - Information is kept not in the Excel books, but on the server in the form of globals MUMPS and virtual Excel sheets @@ -14,26 +14,7 @@ How it works : https://community.intersystems.com/post/intersystem-cache-—-high-performence-and-operations-dbms https://community.intersystems.com/post/m-cell - Download IRIS: https://www.intersystems.com/try-intersystems-iris-for-free/ - https://download.intersystems.com/download/login.csp - - Preparation for start MX with Cache 8-bit or unicode, or IRIS InterSystems : - - download the repository as ZIP file, then unzip to a separate folder, for example: to c:\mx\ - - if you don’t yet have Cache or IRIS, download and install IRIS, preferably in unicode, on any win-computer - - start IRIS (Cache) terminal, then run the following commands after USER>: - - zn "yournspace" - Set root = "path on filesystem to which repository was downloaded" - Do $System.OBJ.ImportDir(root,"vmx.ro","ck",,1) Do ^ZSTU - ( Alternative option : USER> zn "yournspace" Do ^%RI Do ^ZSTU ) - - edit the [connections] table in the MX_CONFI.xlsb (edit tcp port and $znspace) - - run mx.xlsb (MS EXCEL be sure, required dot . as system-decimal-delimiter) then select and press the big button to connect to the mx-server - - you will see sheet with buttons for calling tests and games - - note : if you import vmx.ro to %SYS as well, MX-server will start automatically. - With MX : - you can create new complex projects, or use MX as an auxiliary tool From 6984661eb16f1371c6d99646dce6d4967c4c36f8 Mon Sep 17 00:00:00 2001 From: mx <58824049+mx-alex@users.noreply.github.com> Date: Tue, 25 Feb 2020 17:08:15 +0200 Subject: [PATCH 4/5] Update README.md --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 18d2a82..3918b30 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,11 @@ How it works : https://community.intersystems.com/post/m-cell + For start project with docker see : + https://community.intersystems.com/post/dockerfile-and-friends-or-how-run-and-collaborate-objectscript-projects-intersystems-iris + + + With MX : - you can create new complex projects, or use MX as an auxiliary tool From 4b7866d0e145c0b034c6cb47f68c6bdd25f5ce31 Mon Sep 17 00:00:00 2001 From: mx <58824049+mx-alex@users.noreply.github.com> Date: Fri, 13 Mar 2020 18:09:35 +0200 Subject: [PATCH 5/5] Update docker-compose.yml --- docker-compose.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 67c28b6..fe91c2b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,6 +9,7 @@ services: - 51773 - 52773 - 53773 + - 5264:5264 volumes: - ~/iris.key:/usr/irissys/mgr/iris.key - - ./:/irisdev/app \ No newline at end of file + - ./:/irisdev/app