Skip to content

Commit 27b7f52

Browse files
committed
upgrade
1 parent 8bdf276 commit 27b7f52

16 files changed

Lines changed: 3314 additions & 2717 deletions

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG CACHE_VERSION=2017.2
1+
ARG CACHE_VERSION=2018.1
22
FROM node:8-alpine AS web
33

44
WORKDIR /opt/blocks/

Dockerfile.iris

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
ARG IRIS_VERSION=2018.1
21
FROM node:8-alpine AS web
32

43
WORKDIR /opt/blocks/
@@ -9,7 +8,7 @@ RUN npm install \
98
&& export PATH="$PATH:./node_modules/.bin" \
109
&& webpack --mode production
1110

12-
FROM daimor/intersystems-iris:${IRIS_VERSION}
11+
FROM store/intersystems/iris-community:2020.1.0.202.0
1312

1413
WORKDIR /opt/blocks/
1514

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,18 @@ Database Blocks Explorer for InterSystems Caché
1919
You need license key for Caché or IRIS on RedHat systems.
2020
##### Caché
2121
```
22-
docker run -d --name cacheblocksexplorer --rm \
22+
docker run -d --name blocksexplorer --rm \
2323
-p 52773:52773 \
2424
-v /opt/some/database/for/test:/opt/blocks/db/test \
2525
-v ~/cache.key:/usr/cachesys/mgr/cache.key
26-
daimor/cacheblocksexplorer:cache
26+
daimor/blocksexplorer:cache
2727
```
2828
##### IRIS
2929
```
30-
docker run -d --name cacheblocksexplorer --rm \
30+
docker run -d --name blocksexplorer --rm \
3131
-p 57772:57772 \
3232
-v /opt/some/database/for/test:/opt/blocks/db/test \
33-
-v ~/iris.key:/usr/irissys/mgr/iris.key
34-
daimor/cacheblocksexplorer:iris
33+
daimor/blocksexplorer:iris
3534
```
3635

3736
## Screenshots

docker-compose.cache.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
version: "2.4"
2+
3+
services:
4+
server:
5+
build:
6+
context: server
7+
args:
8+
CACHE_VERSION: ${CACHE_VERSION-2017.1}
9+
ports:
10+
- "${CACHE_WEBPORT-57772}:57772"
11+
- "${CACHE_PORT-1972}:1972"
12+
volumes:
13+
- ~/cache.key:/usr/cachesys/mgr/cache.key
14+
- ./server/src:/opt/blocks/src
15+
web:
16+
environment:
17+
- DB_PORT=57772

docker-compose.iris.yml

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,16 @@
1-
version: "3"
1+
version: "2.4"
22

33
services:
44
server:
55
build:
66
context: server
77
dockerfile: Dockerfile.iris
8-
args:
9-
IRIS_VERSION: ${IRIS_VERSION-2018.1}
108
ports:
119
- "${IRIS_WEBPORT-52773}:52773"
1210
- "${IRIS_PORT-51773}:51773"
1311
volumes:
1412
- ~/iris.key:/usr/irissys/mgr/iris.key
1513
- ./server/src:/opt/blocks/src
1614
web:
17-
build:
18-
context: web
19-
links:
20-
- server
2115
environment:
22-
- DB_HOST=server
23-
- DB_PORT=${IRIS_WEBPORT-52773}
24-
- WEB_PORT=${WEB_PORT-80}
25-
ports:
26-
- "${WEB_PORT-80}:${WEB_PORT-80}"
27-
volumes:
28-
- node_modules:/opt/app/node_modules
29-
- web_build:/opt/app/build
30-
- ./web:/opt/app
31-
volumes:
32-
node_modules: null
33-
web_build: null
16+
- DB_PORT=52773

docker-compose.yml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,20 @@
1-
version: "3"
1+
version: "2.4"
22

33
services:
44
server:
5-
build:
6-
context: server
7-
args:
8-
CACHE_VERSION: ${CACHE_VERSION-2017.1}
9-
ports:
10-
- "${CACHE_WEBPORT-57772}:57772"
11-
- "${CACHE_PORT-1972}:1972"
12-
volumes:
13-
- ~/cache.key:/usr/cachesys/mgr/cache.key
14-
- ./server/src:/opt/blocks/src
5+
extends:
6+
file: docker-compose.${MODE:-iris}.yml
7+
service: server
158
web:
9+
extends:
10+
file: docker-compose.${MODE:-iris}.yml
11+
service: web
1612
build:
1713
context: web
1814
links:
1915
- server
2016
environment:
2117
- DB_HOST=server
22-
- DB_PORT=${CACHE_WEBPORT-57772}
2318
- WEB_PORT=${WEB_PORT-80}
2419
ports:
2520
- "${WEB_PORT-80}:${WEB_PORT-80}"

module.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Export generator="Cache" version="25">
3-
<Document name="CacheBlocksExplorer.MODULE"><Module>
4-
<Name>CacheBlocksExplorer</Name>
3+
<Document name="BlocksExplorer.MODULE"><Module>
4+
<Name>BlocksExplorer</Name>
55
<Version>0.0.1</Version>
66
<Packaging>module</Packaging>
77
<LifecycleClass>Blocks.Lifecycle</LifecycleClass>

server/Dockerfile.iris

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,28 @@
1-
ARG IRIS_VERSION=2018.1
2-
FROM daimor/intersystems-iris:${IRIS_VERSION}
1+
ARG IRIS_VERSION=2020.1.0.202.0
2+
FROM store/intersystems/iris-community:${IRIS_VERSION}
33

44
WORKDIR /opt/blocks
55

6+
USER root
7+
8+
RUN chown ${ISC_PACKAGE_MGRUSER}:${ISC_PACKAGE_IRISGROUP} ${PWD}
9+
10+
USER irisowner
11+
612
COPY ./src/ ./src
713

8-
RUN iris start $ISC_PACKAGE_INSTANCENAME quietly \
9-
&& /bin/echo -e "do ##class(%SYSTEM.OBJ).Load(\"/opt/blocks/src/DevInstaller.cls\",\"cdk\")\n" \
14+
RUN iris start $ISC_PACKAGE_INSTANCENAME quietly && \
15+
/bin/echo -e "" \
16+
"do ##class(%SYSTEM.OBJ).Load(\"/opt/blocks/src/DevInstaller.cls\",\"cdk\")\n" \
1017
"set sc=##class(Blocks.DevInstaller).setupWithVars(\"/opt/blocks/\")\n" \
1118
"do:'sc \$zu(4,\$j,1)\n" \
12-
"Halt\n" \
13-
| iris session ${ISC_PACKAGE_INSTANCENAME} \
14-
&& iris stop $ISC_PACKAGE_INSTANCENAME quietly
19+
"do INT^JRNSTOP kill ^%SYS(\"Journal\")\n" \
20+
"do ##class(Security.Users).UnExpireUserPasswords(\"*\")\n" \
21+
"halt" \
22+
| iris session $ISC_PACKAGE_INSTANCENAME -U%SYS && \
23+
iris stop $ISC_PACKAGE_INSTANCENAME quietly && \
24+
rm $ISC_PACKAGE_INSTALLDIR/mgr/IRIS.WIJ && \
25+
rm $ISC_PACKAGE_INSTALLDIR/mgr/journal/*
1526

1627
VOLUME [ "/opt/blocks/db" ]
1728

server/src/Blocks/Router.cls

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Class Blocks.Router Extends %CSP.REST
66
XData UrlMap
77
{
88
<Routes>
9+
<Route Url="(?:/rest)?/websocket" Method="GET" Call="WebSocket"/>
910
<Route Url="(?:/rest)?/dblist" Method="GET" Call="DBList"/>
1011
<Route Url="(?:/rest)?/ping" Method="GET" Call="Ping"/>
1112
<Route Url="(?:/rest)?/block/:block" Method="GET" Call="BlockInfo"/>
@@ -14,13 +15,10 @@ XData UrlMap
1415
</Routes>
1516
}
1617

17-
ClassMethod OnPreDispatch(pUrl As %String, pMethod As %String, ByRef pContinue As %Boolean) As %Status
18+
ClassMethod WebSocket() As %Status
1819
{
19-
if pUrl = "/websocket" {
20-
set pContinue = 0
21-
set %response.ServerSideRedirect = "/csp/blocks/Blocks.WebSocket.cls"
22-
}
23-
Quit $$$OK
20+
Do ##class(%Library.Device).ReDirectIO(0)
21+
Quit ##class(Blocks.WebSocket).Page(0)
2422
}
2523

2624
ClassMethod outputJSON(data)

server/src/Blocks/SessionHandler.cls

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

0 commit comments

Comments
 (0)