11ARG IMAGE=store/intersystems/iris:2019.1.0.511.0-community
22ARG IMAGE=store/intersystems/iris:2019.2.0.107.0-community
3+ ARG IMAGE=intersystemsdc/iris-community:2020.2.0.204.0-zpm
34FROM $IMAGE
45
5- WORKDIR /opt/app
6-
7- COPY ./src/ ./src/
6+ USER root
7+ WORKDIR /opt/dcanalytics
8+ RUN chown ${ISC_PACKAGE_MGRUSER}:${ISC_PACKAGE_IRISGROUP} /opt/dcanalytics
9+ COPY irissession.sh /
10+ RUN chmod +x /irissession.sh
811
912RUN mkdir -p /tmp/deps \
10-
1113 && cd /tmp/deps \
12-
13- && wget -q https://pm.community.intersystems.com/packages/zpm/latest/installer -O zpm.xml \
14-
1514 # Download globals data
1615&& wget -q -O - https://api.github.com/repos/intersystems-community/dc-analytics/releases/latest \
1716 | egrep 'http.*DCAnalytics_globals.*gz' \
1817 | cut -d : -f 2,3 \
1918 | tr -d '"' \
2019 | wget -O - -i - \
21- | gunzip > /opt/app/globals.xml
22-
23- RUN iris start $ISC_PACKAGE_INSTANCENAME quietly EmergencyId=sys,sys && \
24- /bin/echo -e "sys\n sys\n " \
25- " do ##class(Security.Users).UnExpireUserPasswords(\" *\" )\n " \
26- " do ##class(Security.Users).AddRoles(\" admin\" , \" %ALL\" )\n " \
27- " do \$ system.OBJ.Load(\" /opt/app/dswinstaller.cls\" ,\" ck\" )\n " \
28- " do ##class(Security.System).Get(,.p)\n " \
29- " set p(\" AutheEnabled\" )=\$ zb(p(\" AutheEnabled\" ),16,7)\n " \
30- " do ##class(Security.System).Modify(,.p)\n " \
31- " Do \$ system.OBJ.Load(\" /tmp/deps/zpm.xml\" , \" ck\" )" \
32- " do CreateDatabase^%SYS.SQLSEC(\" DCANALYTICS\" ,\"\" ,,0)\n " \
33- " zn \" DCANALYTICS\" " \
34- " zpm \" install dsw\" " \
35- " do \$ system.OBJ.ImportDir(\" /opt/app/src\" ,,\" ck\" ,,1)\n " \
36- " do ##class(Community.Utils).setup(\" /opt/app/globals.xml\" )" \
37- " zn \" %sys\" " \
38- " write \" Create web application ...\" ,!" \
39- " set webName = \" /csp/dcanalytics\" " \
40- " set webProperties(\" NameSpace\" ) = \" DCANALYTICS\" " \
41- " set webProperties(\" Enabled\" ) = 1" \
42- " set webProperties(\" IsNameSpaceDefault\" ) = 1" \
43- " set webProperties(\" CSPZENEnabled\" ) = 1" \
44- " set webProperties(\" AutheEnabled\" ) = 32" \
45- " set webProperties(\" iKnowEnabled\" ) = 1" \
46- " set webProperties(\" DeepSeeEnabled\" ) = 1" \
47- " set status = ##class(Security.Applications).Create(webName, .webProperties)" \
48- " write:'status \$ system.Status.DisplayError(status)" \
49- " write \" Web application \"\"\" _webName_\"\"\" was created!\" ,!" \
50- " zn \" DCANALYTICS\" " \
51- " halt" \
52- | iris session $ISC_PACKAGE_INSTANCENAME && \
53- /bin/echo -e "sys\n sys\n " \
54- | iris stop $ISC_PACKAGE_INSTANCENAME quietly
55-
56- RUN apt update && apt install -y git && git clone https://github.com/intersystems-community/dsw-reports.git && cp -r dsw-reports/src/web/reports /usr/irissys/csp/dsw/ && cp -r src/reports /usr/irissys/csp/dsw/ && rm -rf dsw-reports
57-
58- COPY ./other/dcanalytics.json /usr/irissys/csp/dsw/configs/
59-
60- COPY ./fixoverlay.sh ./
61-
62- CMD [ "-b" , "/opt/app/fixoverlay.sh" ]
20+ | gunzip > /opt/dcanalytics/globals.xml
21+
22+
23+ USER ${ISC_PACKAGE_MGRUSER}
24+
25+ COPY Installer.cls .
26+ COPY src src
27+ SHELL ["/irissession.sh" ]
28+
29+ RUN \
30+ do $SYSTEM.OBJ.Load("Installer.cls" , "ck" ) \
31+ set sc = ##class(App.Installer).setup() \
32+ zn "DCANALYTICS" \
33+ zpm "install dsw" \
34+ zpm "install isc-dev" \
35+ do ##class(dev.code).workdir("/irisdev/app/src" ) \
36+ do EnableDeepSee^%SYS.cspServer("/csp/dcanalytics/" ) \
37+ do ##class(Community.Utils).setup("/opt/dcanalytics/globals.xml" ) \
38+ zn "%SYS" \
39+ write "Modify MDX2JSON application security..." ,! \
40+ set webName = "/mdx2json" \
41+ set webProperties("AutheEnabled" ) = 64 \
42+ set webProperties("MatchRoles" )=":%DB_IRISAPP" \
43+ set sc = ##class(Security.Applications).Modify(webName, .webProperties) \
44+
45+
46+ SHELL ["/bin/bash" , "-c" ]
47+
48+ COPY /dsw/dcanalytics.json /usr/irissys/csp/dsw/configs/
49+
0 commit comments