Skip to content

Commit 6bce075

Browse files
committed
zpm enabled import, minus installer.cls
1 parent 9735057 commit 6bce075

File tree

8 files changed

+17
-56
lines changed

8 files changed

+17
-56
lines changed

.vscode/settings.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"iris.script": "objectscript"
66
},
77
"objectscript.conn" :{
8-
"ns": "IRISAPP",
8+
"ns": "USER",
99
"username": "_SYSTEM",
1010
"password": "SYS",
1111
"docker-compose": {
@@ -16,7 +16,7 @@
1616
},
1717
"sqltools.connections": [
1818
{
19-
"namespace": "IRISAPP",
19+
"namespace": "USER",
2020
"connectionMethod": "Server and Port",
2121
"showSystem": false,
2222
"previewLimit": 50,

Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ WORKDIR /opt/irisapp
1313
RUN chown ${ISC_PACKAGE_MGRUSER}:${ISC_PACKAGE_IRISGROUP} /opt/irisapp
1414
USER ${ISC_PACKAGE_MGRUSER}
1515

16-
COPY Installer.cls .
16+
#COPY Installer.cls .
1717
COPY src src
18+
COPY module.xml /
1819
COPY iris.script /tmp/iris.script
1920

2021
RUN iris start IRIS \

Installer.cls

-29
This file was deleted.

README.md

+2-13
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ Open IRIS terminal:
3131

3232
```
3333
$ docker-compose exec iris iris session iris
34-
USER>zn "IRISAPP"
35-
IRISAPP>write ##class(PackageSample.ObjectScript).Test()
34+
USER>write ##class(PackageSample.ObjectScript).Test()
3635
```
3736
## How to start coding
3837
This repository is ready to code in VSCode with ObjectScript plugin.
@@ -51,18 +50,8 @@ The script in Installer.cls will import everything you place under /src into IRI
5150

5251
### Dockerfile
5352

54-
The simplest dockerfile which starts IRIS and imports Installer.cls and then runs the Installer.setup method, which creates IRISAPP Namespace and imports ObjectScript code from /src folder into it.
53+
The simplest dockerfile which starts IRIS and imports code from /src folder into it.
5554
Use the related docker-compose.yml to easily setup additional parametes like port number and where you map keys and host folders.
56-
Use .env/ file to adjust the dockerfile being used in docker-compose.
57-
58-
### Dockerfile-zpm
59-
60-
Dockerfile-zpm builds for you a container which contains ZPM package manager client so you are able to install packages from ZPM in this container.
61-
As an example of usage in installs webterminal
62-
63-
### Dockerfile-web
64-
65-
Dockerfile-web starts IRIS does the same what Dockerfile does and also sets up the web app programmatically
6655

6756

6857
### .vscode/settings.json

iris.script

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
; run installer to create namespace
2-
do $SYSTEM.OBJ.Load("/opt/irisapp/Installer.cls", "ck")
3-
set sc = ##class(App.Installer).setup()
42

5-
zn "IRISAPP"
6-
do $System.OBJ.LoadDir("/opt/irisapp/src","ck",,1)
3+
;do $System.OBJ.LoadDir("/opt/irisapp/src","ck",,1)
74

85
zn "%SYS"
96
Do ##class(Security.Users).UnExpireUserPasswords("*")
107

8+
zn "USER"
9+
1110
; call your initial methods here
11+
zpm "load /irisdev/app/ -v":1:1
1212
halt

module.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<Version>0.0.1</Version>
77
<Packaging>module</Packaging>
88
<SourcesRoot>src</SourcesRoot>
9-
<Resource Name="PackageSample.PKG"/>
9+
<Resource Name="dc.PackageSample.PKG"/>
1010
</Module>
1111
</Document>
1212
</Export>

src/PackageSample/ObjectScript.cls renamed to src/dc/PackageSample/ObjectScript.cls

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Class PackageSample.ObjectScript
1+
Class dc.PackageSample.ObjectScript
22
{
33

44
ClassMethod Test() As %Status

src/PackageSample/PersistentClass.cls renamed to src/dc/PackageSample/PersistentClass.cls

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Class PackageSample.PersistentClass Extends %Persistent
1+
Class dc.PackageSample.PersistentClass Extends %Persistent
22
{
33

44
Property Test As %VarString;
@@ -20,11 +20,11 @@ Storage Default
2020
<Value>Test</Value>
2121
</Value>
2222
</Data>
23-
<DataLocation>^PackageSample.PersistentClassD</DataLocation>
23+
<DataLocation>^dc.Package4C8F.PersistentC1A93D</DataLocation>
2424
<DefaultData>PersistentClassDefaultData</DefaultData>
25-
<IdLocation>^PackageSample.PersistentClassD</IdLocation>
26-
<IndexLocation>^PackageSample.PersistentClassI</IndexLocation>
27-
<StreamLocation>^PackageSample.PersistentClassS</StreamLocation>
25+
<IdLocation>^dc.Package4C8F.PersistentC1A93D</IdLocation>
26+
<IndexLocation>^dc.Package4C8F.PersistentC1A93I</IndexLocation>
27+
<StreamLocation>^dc.Package4C8F.PersistentC1A93S</StreamLocation>
2828
<Type>%Storage.Persistent</Type>
2929
}
3030

0 commit comments

Comments
 (0)