Skip to content

Commit 53d9eda

Browse files
committed
refactor template for 2.3.0
1 parent d8479d0 commit 53d9eda

File tree

8 files changed

+32
-40
lines changed

8 files changed

+32
-40
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ __pycache__
33

44

55
iris-main.log
6+
.venv

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"request": "launch",
88
"program": "${file}",
99
"console": "integratedTerminal",
10-
"justMyCode": true
10+
"justMyCode": false
1111
},
1212
{
1313
"type": "objectscript",

.vscode/settings.json

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,19 @@
1515
"active": true,
1616
"links": {
1717
"Production": "http://localhost:${port}/csp/irisapp/EnsPortal.ProductionConfig.zen?PRODUCTION=dc.Demo.Production"
18-
}
18+
}
1919
},
20+
"intersystems.servers": {
21+
"devcontainer": {
22+
"username": "SuperUser",
23+
"password": "SYS",
24+
"webServer": {
25+
"scheme": "http",
26+
"host": "127.0.0.1",
27+
"port": 52773
28+
},
29+
},
30+
},
2031
"sqltools.connections": [
2132
{
2233
"namespace": "IRISAPP",
@@ -31,6 +42,10 @@
3142
"username": "_SYSTEM",
3243
"password": "SYS"
3344
}
34-
]
45+
],
46+
"[python]": {
47+
"editor.defaultFormatter": "ms-python.autopep8"
48+
},
49+
"python.formatting.provider": "none"
3550

3651
}

Dockerfile

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ARG IMAGE=intersystemsdc/iris-community:latest
2-
FROM $IMAGE
2+
FROM $IMAGE as builder
33

44
# use the root user to install packages
55
USER root
@@ -24,8 +24,18 @@ ENV IRISNAMESPACE "IRISAPP"
2424
# create the namespace and install the application
2525
RUN iris start IRIS \
2626
&& iris session IRIS < /tmp/iris.script \
27-
&& /usr/irissys/bin/irispython src/python/register.py \
27+
&& /usr/irissys/bin/irispython -m grongier.pex -M /irisdev/app/src/python/reddit/settings.py \
2828
&& iris stop IRIS quietly
2929

30+
FROM $IMAGE as final
3031

32+
ADD --chown=${ISC_PACKAGE_MGRUSER}:${ISC_PACKAGE_IRISGROUP} https://github.com/grongierisc/iris-docker-multi-stage-script/releases/latest/download/copy-data.py /irisdev/app/copy-data.py
3133

34+
RUN --mount=type=bind,source=/,target=/builder/root,from=builder \
35+
cp -f /builder/root/usr/irissys/iris.cpf /usr/irissys/iris.cpf && \
36+
python3 /irisdev/app/copy-data.py -c /usr/irissys/iris.cpf -d /builder/root/
37+
38+
# environment variables for embedded python
39+
ENV IRISUSERNAME "SuperUser"
40+
ENV IRISPASSWORD "SYS"
41+
ENV IRISNAMESPACE "IRISAPP"

iris.script

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33

44
zn "IRISAPP"
55
zpm "install pex-embbeded-python"
6-
do $System.OBJ.LoadDir("/irisdev/app/src","ck",,1)
7-
8-
set ^EnsPortal.Settings("SuperUser","LastProduction") = "dc.Demo.Production"
96

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

src/dc/Demo/Production.cls

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/python/reddit/bp.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,5 @@ def on_python_message(self, request: PostMessage):
3232

3333
if request.found is not None:
3434
self.send_request_sync(self.target,request)
35+
3536
return

src/python/register.py

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)