Skip to content

Commit 43fce91

Browse files
Add ZPM (InterSystems package manager)
1 parent 30e13a4 commit 43fce91

File tree

9 files changed

+1007
-2
lines changed

9 files changed

+1007
-2
lines changed

Dockerfile

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
ARG IMAGE=intersystems/iris:2019.1.0S.111.0
2+
ARG IMAGE=store/intersystems/irishealth:2019.3.0.308.0-community
3+
ARG IMAGE=store/intersystems/iris-community:2019.3.0.309.0
4+
ARG IMAGE=store/intersystems/iris-community:2019.4.0.379.0
5+
ARG IMAGE=store/intersystems/iris-community:2020.1.0.197.0
6+
ARG IMAGE=intersystemsdc/iris-community:2020.1.0.209.0-zpm
7+
ARG IMAGE=intersystemsdc/iris-community:2020.1.0.215.0-zpm
8+
ARG IMAGE=intersystemsdc/iris-community:2020.2.0.204.0-zpm
9+
FROM $IMAGE
10+
11+
USER root
12+
13+
WORKDIR /opt/irisapp
14+
RUN chown ${ISC_PACKAGE_MGRUSER}:${ISC_PACKAGE_IRISGROUP} /opt/irisapp
15+
16+
USER irisowner
17+
18+
COPY Installer.cls .
19+
COPY src src
20+
COPY build-for-zpm build-for-zpm
21+
COPY irissession.sh /
22+
SHELL ["/irissession.sh"]
23+
24+
RUN \
25+
do $SYSTEM.OBJ.Load("Installer.cls", "ck") \
26+
set sc = ##class(App.Installer).setup() \
27+
zn "%SYS" \
28+
write "Creating web application ..." \
29+
set webName = "/ClassExplorer" \
30+
set webProperties("DispatchClass") = "ClassExplorer.Router" \
31+
set webProperties("NameSpace") = "IRISAPP" \
32+
set webProperties("Enabled") = 1 \
33+
set webProperties("AutheEnabled") = 32 \
34+
set sc = ##class(Security.Applications).Create(webName, .webProperties) \
35+
write sc \
36+
write "Web application "_webName_" has been created!"
37+
38+
# bringing the standard shell back
39+
SHELL ["/bin/bash", "-c"]
40+
CMD [ "-l", "/usr/irissys/mgr/messages.log" ]

Installer.cls

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Class App.Installer
2+
{
3+
4+
XData setup
5+
{
6+
<Manifest>
7+
<Default Name="SourceDir" Value="#{$system.Process.CurrentDirectory()}build-for-zpm"/>
8+
9+
<Namespace Name="IRISAPP" Code="IRISAPP" Data="IRISAPP" Create="yes" Ensemble="no">
10+
11+
<Configuration>
12+
<Database Name="IRISAPP" Dir="/opt/irisapp/data" Create="yes"/>
13+
</Configuration>
14+
<Import File="${SourceDir}" Flags="ck" Recurse="1"/>
15+
</Namespace>
16+
17+
</Manifest>
18+
}
19+
20+
ClassMethod setup(ByRef pVars, pLogLevel As %Integer = 3, pInstaller As %Installer.Installer, pLogger As %Installer.AbstractLogger) As %Status [ CodeMode = objectgenerator, Internal ]
21+
{
22+
#; Let XGL document generate code for this method.
23+
Quit ##class(%Installer.Manifest).%Generate(%compiledclass, %code, "setup")
24+
}
25+
26+
}

0 commit comments

Comments
 (0)