Skip to content

Commit 8307164

Browse files
Evgeny ShvarovEvgeny Shvarov
authored andcommitted
added zpm configuration
1 parent adf30da commit 8307164

5 files changed

Lines changed: 138 additions & 19 deletions

File tree

Dockerfile

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,41 +2,25 @@ ARG IMAGE=intersystems/iris:2019.1.0S.111.0
22
ARG IMAGE=store/intersystems/iris:2019.1.0.511.0-community
33
ARG IMAGE=store/intersystems/iris:2019.2.0.107.0-community
44
#ARG IMAGE=intersystems/iris:2019.3.0.302.0
5+
ARG IMAGE=store/intersystems/iris:2019.3.0.302.0-community
56
FROM $IMAGE
67

78
WORKDIR /opt/app
89

910
COPY ./Installer.cls ./
1011
COPY ./src/cls ./src/cls
1112
#COPY ./src/dfi ./src/dfi
12-
13+
USER root
1314

1415
RUN iris start $ISC_PACKAGE_INSTANCENAME quietly EmergencyId=sys,sys && \
1516
/bin/echo -e "sys\nsys\n" \
16-
" Do ##class(Security.Users).UnExpireUserPasswords(\"*\")\n" \
17-
" Do ##class(Security.Users).AddRoles(\"admin\", \"%ALL\")\n" \
18-
" Do ##class(Security.System).Get(,.p)\n" \
19-
" Set p(\"AutheEnabled\")=\$zb(p(\"AutheEnabled\"),16,7)\n" \
20-
" Do ##class(Security.System).Modify(,.p)\n" \
2117
" Do \$system.OBJ.Load(\"/opt/app/Installer.cls\",\"ck\")\n" \
2218
" Set sc = ##class(App.Installer).setup(, 3)\n" \
2319
" If 'sc do \$zu(4, \$JOB, 1)\n" \
24-
" zn \"%sys\"" \
25-
" write \"Create web application ...\",!" \
26-
" set webName = \"/csp/user\"" \
27-
" set webProperties(\"NameSpace\") = \"USER\"" \
28-
" set webProperties(\"Enabled\") = 1" \
29-
" set webProperties(\"IsNameSpaceDefault\") = 1" \
30-
" set webProperties(\"CSPZENEnabled\") = 1" \
31-
" set webProperties(\"AutheEnabled\") = 32" \
32-
" set webProperties(\"iKnowEnabled\") = 1" \
33-
" set webProperties(\"DeepSeeEnabled\") = 1" \
34-
" set status = ##class(Security.Applications).Create(webName, .webProperties)" \
35-
" write:'status \$system.Status.DisplayError(status)" \
36-
" write \"Web application \"\"\"_webName_\"\"\" was created!\",!" \
3720
" halt" \
3821
| iris session $ISC_PACKAGE_INSTANCENAME && \
3922
/bin/echo -e "sys\nsys\n" \
4023
| iris stop $ISC_PACKAGE_INSTANCENAME quietly
4124

25+
USER ${ISC_PACKAGE_MGRUSER}
4226
CMD [ "-l", "/usr/irissys/mgr/messages.log" ]

Dockerfile-before20193

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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+
ARG IMAGE=store/intersystems/iris:2019.3.0.302.0-community
6+
FROM $IMAGE
7+
8+
WORKDIR /opt/app
9+
10+
COPY ./Installer.cls ./
11+
COPY ./src/cls ./src/cls
12+
#COPY ./src/dfi ./src/dfi
13+
14+
15+
RUN iris start $ISC_PACKAGE_INSTANCENAME quietly EmergencyId=sys,sys && \
16+
/bin/echo -e "sys\nsys\n" \
17+
" Do ##class(Security.Users).UnExpireUserPasswords(\"*\")\n" \
18+
" Do ##class(Security.Users).AddRoles(\"admin\", \"%ALL\")\n" \
19+
" Do ##class(Security.System).Get(,.p)\n" \
20+
" Set p(\"AutheEnabled\")=\$zb(p(\"AutheEnabled\"),16,7)\n" \
21+
" Do ##class(Security.System).Modify(,.p)\n" \
22+
" Do \$system.OBJ.Load(\"/opt/app/Installer.cls\",\"ck\")\n" \
23+
" Set sc = ##class(App.Installer).setup(, 3)\n" \
24+
" If 'sc do \$zu(4, \$JOB, 1)\n" \
25+
" zn \"%sys\"" \
26+
" write \"Create web application ...\",!" \
27+
" set webName = \"/csp/user\"" \
28+
" set webProperties(\"NameSpace\") = \"USER\"" \
29+
" set webProperties(\"Enabled\") = 1" \
30+
" set webProperties(\"IsNameSpaceDefault\") = 1" \
31+
" set webProperties(\"CSPZENEnabled\") = 1" \
32+
" set webProperties(\"AutheEnabled\") = 32" \
33+
" set webProperties(\"iKnowEnabled\") = 1" \
34+
" set webProperties(\"DeepSeeEnabled\") = 1" \
35+
" set status = ##class(Security.Applications).Create(webName, .webProperties)" \
36+
" write:'status \$system.Status.DisplayError(status)" \
37+
" write \"Web application \"\"\"_webName_\"\"\" was created!\",!" \
38+
" halt" \
39+
| iris session $ISC_PACKAGE_INSTANCENAME && \
40+
/bin/echo -e "sys\nsys\n" \
41+
| iris stop $ISC_PACKAGE_INSTANCENAME quietly
42+
43+
CMD [ "-l", "/usr/irissys/mgr/messages.log" ]

Dockerfile-webapp

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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+
ARG IMAGE=store/intersystems/iris:2019.3.0.302.0-community
6+
FROM $IMAGE
7+
8+
WORKDIR /opt/app
9+
10+
COPY ./Installer.cls ./
11+
COPY ./src/cls ./src/cls
12+
#COPY ./src/dfi ./src/dfi
13+
USER root
14+
15+
RUN iris start $ISC_PACKAGE_INSTANCENAME quietly EmergencyId=sys,sys && \
16+
/bin/echo -e "sys\nsys\n" \
17+
" Do \$system.OBJ.Load(\"/opt/app/Installer.cls\",\"ck\")\n" \
18+
" Set sc = ##class(App.Installer).setup(, 3)\n" \
19+
" If 'sc do \$zu(4, \$JOB, 1)\n" \
20+
" zn \"%sys\"" \
21+
" write \"Create web application ...\",!" \
22+
" set webName = \"/csp/user\"" \
23+
" set webProperties(\"NameSpace\") = \"USER\"" \
24+
" set webProperties(\"Enabled\") = 1" \
25+
" set webProperties(\"IsNameSpaceDefault\") = 1" \
26+
" set webProperties(\"CSPZENEnabled\") = 1" \
27+
" set webProperties(\"AutheEnabled\") = 32" \
28+
" set webProperties(\"iKnowEnabled\") = 1" \
29+
" set webProperties(\"DeepSeeEnabled\") = 1" \
30+
" set status = ##class(Security.Applications).Create(webName, .webProperties)" \
31+
" write:'status \$system.Status.DisplayError(status)" \
32+
" write \"Web application \"\"\"_webName_\"\"\" was created!\",!" \
33+
" halt" \
34+
| iris session $ISC_PACKAGE_INSTANCENAME && \
35+
/bin/echo -e "sys\nsys\n" \
36+
| iris stop $ISC_PACKAGE_INSTANCENAME quietly
37+
38+
USER ${ISC_PACKAGE_MGRUSER}
39+
CMD [ "-l", "/usr/irissys/mgr/messages.log" ]

Dockerfile-zpm

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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+
WORKDIR /opt/app
9+
10+
COPY ./Installer.cls ./
11+
COPY ./src/cls ./src/cls
12+
#COPY ./src/dfi ./src/dfi
13+
14+
USER root
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 ##class(Security.Users).AddRoles(\"admin\", \"%ALL\")\n" \
27+
" Do ##class(Security.System).Get(,.p)\n" \
28+
" Set p(\"AutheEnabled\")=\$zb(p(\"AutheEnabled\"),16,7)\n" \
29+
" Do ##class(Security.System).Modify(,.p)\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}
40+
41+
CMD [ "-l", "/usr/irissys/mgr/messages.log" ]

docker-compose-zpm.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
7+
restart: always
8+
ports:
9+
- 52773:52773
10+
volumes:
11+
- ~/iris.key:/usr/irissys/mgr/iris.key
12+
- ./:/iris/app

0 commit comments

Comments
 (0)