-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #315 from evshvarov/master
docker infrastructure optimisation
- Loading branch information
Showing
4 changed files
with
51 additions
and
60 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 |
---|---|---|
@@ -1,42 +1,33 @@ | ||
ARG IMAGE=store/intersystems/iris-aa-community:2020.3.0AA.331.0 | ||
ARG IMAGE=intersystemsdc/iris-community:2020.2.0.196.0-zpm | ||
ARG IMAGE=intersystemsdc/iris-aa-community:2020.3.0AA.331.0-zpm | ||
ARG IMAGE=intersystemsdc/iris-community:2020.3.0.200.0-zpm | ||
ARG IMAGE=intersystemsdc/irishealth-community:2020.4.0.524.0-zpm | ||
ARG IMAGE=intersystemsdc/irishealth-community:2021.1.0.215.3-zpm | ||
ARG IMAGE=intersystemsdc/irishealth-community:2020.3.0.200.0-zpm | ||
ARG IMAGE=intersystemsdc/iris-community:2020.4.0.547.0-zpm | ||
ARG IMAGE=containers.intersystems.com/intersystems/iris:2021.1.0.215.0 | ||
ARG IMAGE=intersystemsdc/iris-community:preview | ||
ARG IMAGE=intersystemsdc/irishealth-community | ||
ARG IMAGE=intersystemsdc/iris-community | ||
FROM $IMAGE | ||
|
||
USER root | ||
WORKDIR /opt/irisapp | ||
RUN chown ${ISC_PACKAGE_MGRUSER}:${ISC_PACKAGE_IRISGROUP} /opt/irisapp | ||
WORKDIR /home/irisowner/irisdev | ||
|
||
COPY irissession.sh / | ||
RUN chmod +x /irissession.sh | ||
## install git | ||
## USER root | ||
##RUN apt update && apt-get -y install git | ||
##USER ${ISC_PACKAGE_MGRUSER} | ||
|
||
USER ${ISC_PACKAGE_MGRUSER} | ||
ARG TESTS=0 | ||
ARG MODULE="dc-sample" | ||
ARG NAMESPACE="IRISAPP" | ||
|
||
# copy files | ||
COPY Installer.cls . | ||
# COPY src src | ||
# COPY iris.script /tmp/iris.script | ||
SHELL ["/irissession.sh"] | ||
## Embedded Python environment | ||
ENV IRISUSERNAME "_SYSTEM" | ||
ENV IRISPASSWORD "SYS" | ||
ENV IRISNAMESPACE $NAMESPACE | ||
ENV PYTHON_PATH=/usr/irissys/bin/ | ||
ENV PATH "/usr/irissys/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/irisowner/bin" | ||
|
||
RUN \ | ||
do $SYSTEM.OBJ.Load("Installer.cls", "ck") \ | ||
set sc = ##class(App.Installer).setup() \ | ||
zn "IRISAPP" \ | ||
zpm "install dsw" \ | ||
zpm "install samples-bi" | ||
|
||
# bringing the standard shell back | ||
SHELL ["/bin/bash", "-c"] | ||
|
||
# special extract treatment for hate-speech dataset | ||
# RUN mkdir /data/hate-speech/ \ | ||
# && tar -xf /data/hate-speech.tar -C /data/ | ||
|
||
# load demo stuff | ||
RUN iris start IRIS | ||
RUN rm -r /usr/irissys/csp/dsw/* | ||
COPY ./dist/. /usr/irissys/csp/dsw/ | ||
RUN --mount=type=bind,src=.,dst=. \ | ||
pip3 install -r requirements.txt && \ | ||
iris start IRIS && \ | ||
iris session IRIS < iris.script && \ | ||
([ $TESTS -eq 0 ] || iris session iris -U $NAMESPACE "##class(%ZPM.PackageManager).Shell(\"test $MODULE -v -only\",1,1)") && \ | ||
iris stop IRIS quietly |
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 |
---|---|---|
@@ -1,14 +1,14 @@ | ||
version: '3.6' | ||
services: | ||
iris: | ||
build: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
restart: always | ||
ports: | ||
- 1972:1972 | ||
- 52773:52773 | ||
- 53773:53773 | ||
command: --check-caps false | ||
ports: | ||
- 1972 | ||
- 52773 | ||
- 53773 | ||
volumes: | ||
- ~/iris.key:/usr/irissys/mgr/iris.key | ||
- ./:/irisdev/app | ||
- ./:/home/irisowner/irisdev |
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 @@ | ||
// Unexpire passwords to simplify dev mode. Comment these two lines for Production use | ||
zn "%SYS" | ||
Do ##class(Security.Users).UnExpireUserPasswords("*") | ||
|
||
; enabling callin for Embedded Python | ||
do ##class(Security.Services).Get("%Service_CallIn",.prop) | ||
set prop("Enabled")=1 | ||
set prop("AutheEnabled")=48 | ||
do ##class(Security.Services).Modify("%Service_CallIn",.prop) | ||
|
||
// create IRISAPP namespace | ||
do $SYSTEM.OBJ.Load("/home/irisowner/irisdev/Installer.cls", "ck") | ||
set sc = ##class(App.Installer).setup() | ||
|
||
|
||
// load all the code of the project as a ZPM package | ||
zn "IRISAPP" | ||
zpm "load /home/irisowner/irisdev/ -v":1:1 | ||
halt |
This file was deleted.
Oops, something went wrong.