-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
ARG IMAGE=store/intersystems/irishealth:2019.3.0.308.0-community | ||
ARG IMAGE=store/intersystems/iris-community:2019.3.0.309.0 | ||
ARG IMAGE=store/intersystems/iris-community:2019.4.0.379.0 | ||
ARG IMAGE=store/intersystems/iris-community:2020.1.0.199.0 | ||
ARG IMAGE=intersystemsdc/iris-community:2019.4.0.383.0-zpm | ||
FROM $IMAGE | ||
|
||
USER root | ||
|
||
WORKDIR /opt/irisapp | ||
RUN chown ${ISC_PACKAGE_MGRUSER}:${ISC_PACKAGE_IRISGROUP} /opt/irisapp | ||
|
||
USER irisowner | ||
|
||
COPY Installer.cls . | ||
COPY src src | ||
COPY irissession.sh / | ||
SHELL ["/irissession.sh"] | ||
|
||
RUN \ | ||
do $SYSTEM.OBJ.Load("Installer.cls", "ck") \ | ||
set sc = ##class(App.Installer).setup() | ||
|
||
# bringing the standard shell back | ||
SHELL ["/bin/bash", "-c"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
Class App.Installer | ||
{ | ||
|
||
XData setup | ||
{ | ||
<Manifest> | ||
<Default Name="SourceDir" Value="#{$system.Process.CurrentDirectory()}src"/> | ||
<Default Name="Namespace" Value="IRISAPP"/> | ||
<Default Name="app" Value="irisapp" /> | ||
|
||
<Namespace Name="${Namespace}" Code="${Namespace}" Data="${Namespace}" Create="yes" Ensemble="no"> | ||
|
||
<Configuration> | ||
<Database Name="${Namespace}" Dir="/opt/${app}/data" Create="yes" Resource="%DB_${Namespace}"/> | ||
|
||
<Import File="${SourceDir}" Flags="ck" Recurse="1"/> | ||
</Configuration> | ||
<CSPApplication Url="/csp/${app}" Directory="${cspdir}${app}" ServeFiles="1" Recurse="1" MatchRoles=":%DB_${Namespace}" AuthenticationMethods="32" | ||
|
||
/> | ||
</Namespace> | ||
|
||
</Manifest> | ||
} | ||
|
||
ClassMethod setup(ByRef pVars, pLogLevel As %Integer = 3, pInstaller As %Installer.Installer, pLogger As %Installer.AbstractLogger) As %Status [ CodeMode = objectgenerator, Internal ] | ||
{ | ||
#; Let XGL document generate code for this method. | ||
Quit ##class(%Installer.Manifest).%Generate(%compiledclass, %code, "setup") | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
version: '3.6' | ||
services: | ||
iris: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
restart: always | ||
ports: | ||
- 51773 | ||
- 52773 | ||
- 53773 | ||
volumes: | ||
- ~/iris.key:/usr/irissys/mgr/iris.key | ||
- ./:/irisdev/app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
iris start $ISC_PACKAGE_INSTANCENAME quietly | ||
|
||
cat << EOF | iris session $ISC_PACKAGE_INSTANCENAME -U %SYS | ||
do ##class(%SYSTEM.Process).CurrentDirectory("$PWD") | ||
$@ | ||
if '\$Get(sc) do ##class(%SYSTEM.Process).Terminate(, 1) | ||
zn "%SYS" | ||
do ##class(SYS.Container).QuiesceForBundling() | ||
Do ##class(Security.Users).UnExpireUserPasswords("*") | ||
halt | ||
EOF | ||
|
||
exit=$? | ||
|
||
iris stop $ISC_PACKAGE_INSTANCENAME quietly | ||
|
||
exit $exit |