Skip to content

Commit 504ccfc

Browse files
Evgeny ShvarovEvgeny Shvarov
authored andcommitted
zpm updated
1 parent d026f77 commit 504ccfc

7 files changed

Lines changed: 82 additions & 27 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.DS_Store
2+
ISC
23

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
ARG IMAGE=intersystems/iris:2019.1.0S.111.0
2+
ARG IMAGE=store/intersystems/irishealth:2019.3.0.308.0-community
23
ARG IMAGE=store/intersystems/iris-community:2019.3.0.309.0
34
FROM $IMAGE
45

Dockerfile-zpm

Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
11
ARG IMAGE=intersystems/iris:2019.1.0S.111.0
2-
ARG IMAGE=store/intersystems/iris:2019.1.0.511.0-community
3-
ARG IMAGE=store/intersystems/iris:2019.2.0.107.0-community
4-
#ARG IMAGE=intersystems/iris:2019.3.0.302.0
5-
ARG IMAGE=store/intersystems/iris-community:2019.3.0.302.0
2+
ARG IMAGE=store/intersystems/iris-community:2019.3.0.309.0
63
FROM $IMAGE
74

85
USER root
9-
WORKDIR /opt/app
10-
RUN chown ${ISC_PACKAGE_MGRUSER}:${ISC_PACKAGE_IRISGROUP} /opt/app
116

12-
USER irisowner
7+
WORKDIR /opt/irisapp
8+
RUN chown ${ISC_PACKAGE_MGRUSER}:${ISC_PACKAGE_IRISGROUP} /opt/irisapp
9+
1310

14-
COPY ./Installer.cls ./
15-
COPY ./src/cls ./src/cls
16-
#COPY ./src/dfi ./src/dfi
11+
USER irisowner
1712

1813
RUN mkdir -p /tmp/deps \
1914

@@ -22,20 +17,16 @@ RUN mkdir -p /tmp/deps \
2217
&& wget -q https://pm.community.intersystems.com/packages/zpm/latest/installer -O zpm.xml
2318

2419

25-
RUN iris start $ISC_PACKAGE_INSTANCENAME quietly && \
26-
/bin/echo -e \
27-
"zn \"%SYS\"\n" \
28-
" Do ##class(Security.Users).UnExpireUserPasswords(\"*\")\n" \
29-
"zn \"USER\"\n" \
30-
" Do \$system.OBJ.Load(\"/tmp/deps/zpm.xml\", \"ck\")" \
31-
" Do \$system.OBJ.Load(\"/opt/app/Installer.cls\",\"ck\")\n" \
32-
" Set sc = ##class(App.Installer).setup(, 3)\n" \
33-
" If 'sc do \$zu(4, \$JOB, 1)\n" \
34-
" halt" \
35-
| iris session $ISC_PACKAGE_INSTANCENAME && \
36-
/bin/echo -e "sys\nsys\n" \
37-
| iris stop $ISC_PACKAGE_INSTANCENAME quietly
38-
39-
USER ${ISC_PACKAGE_MGRUSER}
20+
COPY Installer.cls .
21+
COPY src src
22+
COPY irissession.sh /
23+
24+
SHELL ["/irissession.sh"]
25+
26+
RUN \
27+
do $SYSTEM.OBJ.Load("Installer.cls", "ck") \
28+
Do $system.OBJ.Load(\"/tmp/deps/zpm.xml", "ck") \
29+
set sc = ##class(App.Installer).setup()
30+
4031

4132
CMD [ "-l", "/usr/irissys/mgr/messages.log" ]

Dockerfile-zpm-samplesbi

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
ARG IMAGE=intersystems/iris:2019.1.0S.111.0
2+
ARG IMAGE=store/intersystems/iris:2019.1.0.511.0-community
3+
ARG IMAGE=store/intersystems/iris:2019.2.0.107.0-community
4+
#ARG IMAGE=intersystems/iris:2019.3.0.302.0
5+
FROM $IMAGE
6+
ARG IMAGE=store/intersystems/iris:2019.3.0.302.0-community
7+
8+
USER root
9+
WORKDIR /opt/app
10+
RUN chown ${ISC_PACKAGE_MGRUSER}:${ISC_PACKAGE_IRISGROUP} /opt/app
11+
12+
COPY ./Installer.cls ./
13+
COPY ./src/cls ./src/cls
14+
#COPY ./src/dfi ./src/dfi
15+
16+
RUN mkdir -p /tmp/deps \
17+
18+
&& cd /tmp/deps \
19+
20+
&& wget -q https://pm.community.intersystems.com/packages/zpm/latest/installer -O zpm.xml
21+
22+
23+
RUN iris start $ISC_PACKAGE_INSTANCENAME quietly EmergencyId=sys,sys && \
24+
/bin/echo -e "sys\nsys\n" \
25+
" Do ##class(Security.Users).UnExpireUserPasswords(\"*\")\n" \
26+
" Do \$system.OBJ.Load(\"/tmp/deps/zpm.xml\", \"ck\")" \
27+
" zpm \"install holefoods\"" \
28+
" Do \$system.OBJ.Load(\"/opt/app/Installer.cls\",\"ck\")\n" \
29+
" Set sc = ##class(App.Installer).setup(, 3)\n" \
30+
" If 'sc do \$zu(4, \$JOB, 1)\n" \
31+
" zn \"%sys\"" \
32+
" write \"Create web application ...\",!" \
33+
" set webName = \"/csp/samples\"" \
34+
" set webProperties(\"NameSpace\") = \"SAMPLES\"" \
35+
" set webProperties(\"Enabled\") = 1" \
36+
" set webProperties(\"IsNameSpaceDefault\") = 1" \
37+
" set webProperties(\"CSPZENEnabled\") = 1" \
38+
" set webProperties(\"AutheEnabled\") = 32" \
39+
" set webProperties(\"iKnowEnabled\") = 1" \
40+
" set webProperties(\"DeepSeeEnabled\") = 1" \
41+
" set status = ##class(Security.Applications).Create(webName, .webProperties)" \
42+
" write:'status \$system.Status.DisplayError(status)" \
43+
" write \"Web application \"\"\"_webName_\"\"\" has been created!\",!" \
44+
" halt" \
45+
| iris session $ISC_PACKAGE_INSTANCENAME && \
46+
/bin/echo -e "sys\nsys\n" \
47+
| iris stop $ISC_PACKAGE_INSTANCENAME quietly
48+
49+
USER ${ISC_PACKAGE_MGRUSER}
50+
51+
CMD [ "-l", "/usr/irissys/mgr/messages.log" ]

Dockerfile-zpm-webterminal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ RUN iris start $ISC_PACKAGE_INSTANCENAME quietly && \
3131
" Do \$system.OBJ.Load(\"/opt/app/Installer.cls\",\"ck\")\n" \
3232
" Set sc = ##class(App.Installer).setup(, 3)\n" \
3333
" If 'sc do \$zu(4, \$JOB, 1)\n" \
34-
" zpm \"install webterminal\""
34+
" zpm \"install webterminal\"" \
3535
" halt" \
3636
| iris session $ISC_PACKAGE_INSTANCENAME && \
3737
/bin/echo -e "sys\nsys\n" \

docker-compose-zpm-samplesbi.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: '2.4'
2+
services:
3+
iris:
4+
build:
5+
context: .
6+
dockerfile: Dockerfile-zpm-samplesbi
7+
restart: always
8+
ports:
9+
- 52773:52773
10+
volumes:
11+
- ~/iris.key:/usr/irissys/mgr/iris.key
12+
- ./:/iris/app

irissession.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
#!/bin/bash
32

43
iris start $ISC_PACKAGE_INSTANCENAME quietly

0 commit comments

Comments
 (0)