@@ -5,7 +5,6 @@ COPY service/package*.json ./
55RUN npm install
66COPY service/ ./
77RUN npm run build
8-
98RUN npm pack
109
1110# Build web-app
@@ -16,83 +15,74 @@ COPY web-app/package*.json ./
1615RUN npm install
1716COPY web-app/ ./
1817RUN npm run build
19-
2018RUN npm pack ./dist
2119
22- FROM node:20.11.1 AS build-arcwebplugin
23- # Build arcgis service plugin
24- WORKDIR /arcgiswebplugin
25- COPY plugins/arcgis/web-app/package*.json ./
26- RUN npm install
27- COPY --from=build-service /service /arcgiswebplugin/node_modules/@ngageoint/mage.service
28- COPY plugins/arcgis/web-app/ ./
29- RUN npm run build
30- RUN npm pack ./dist/main
20+ # FROM node:20.11.1 AS build-arcwebplugin
21+ # # Build arcgis service plugin
22+ # WORKDIR /arcgiswebplugin
23+ # COPY plugins/arcgis/web-app/package*.json ./
24+ # RUN npm install
25+ # COPY --from=build-service /service /arcgiswebplugin/node_modules/@ngageoint/mage.service
26+ # COPY plugins/arcgis/web-app/ ./
27+ # RUN npm run build
28+ # RUN npm pack ./dist/main
3129
32- FROM node:20.11.1 AS build-arcserviceplugin
33- WORKDIR /arcgisserviceplugin
34- COPY plugins/arcgis/service/package*.json ./
35- RUN npm install
36- COPY --from=build-service /service /arcgisserviceplugin/node_modules/@ngageoint/mage.service
37- COPY plugins/arcgis/service/ ./
38- RUN npm run build
39- RUN npm pack
30+ # FROM node:20.11.1 AS build-arcserviceplugin
31+ # WORKDIR /arcgisserviceplugin
32+ # COPY plugins/arcgis/service/package*.json ./
33+ # RUN npm install
34+ # COPY --from=build-service /service /arcgisserviceplugin/node_modules/@ngageoint/mage.service
35+ # COPY plugins/arcgis/service/ ./
36+ # RUN npm run build
37+ # RUN npm pack
4038
41- FROM node:20.11.1 AS build-imageserviceplugin
42- WORKDIR /imageserviceplugin
43- COPY plugins/image/service/package*.json ./
44- RUN npm install
45- COPY --from=build-service /service /imageserviceplugin/node_modules/@ngageoint/mage.service
46- RUN rm -rf /imageserviceplugin/node_modules/@ngageoint/mage.service/node_modules/mongoose
47- COPY plugins/image/service/ ./
48- RUN npm run build
49- RUN npm pack
39+ # FROM node:20.11.1 AS build-imageserviceplugin
40+ # WORKDIR /imageserviceplugin
41+ # COPY plugins/image/service/package*.json ./
42+ # RUN npm install
43+ # COPY --from=build-service /service /imageserviceplugin/node_modules/@ngageoint/mage.service
44+ # RUN rm -rf /imageserviceplugin/node_modules/@ngageoint/mage.service/node_modules/mongoose
45+ # COPY plugins/image/service/ ./
46+ # RUN npm run build
47+ # RUN npm pack
5048
51- FROM node:20.11.1 AS build-sftpserviceplugin
52- WORKDIR /sftpserviceplugin
53- COPY plugins/sftp/service/package*.json ./
54- RUN npm install
55- COPY --from=build-service /service /sftpserviceplugin/node_modules/@ngageoint/mage.service
56- COPY plugins/sftp/service/ ./
57- RUN npm run build
58- RUN npm pack
49+ # FROM node:20.11.1 AS build-sftpserviceplugin
50+ # WORKDIR /sftpserviceplugin
51+ # COPY plugins/sftp/service/package*.json ./
52+ # RUN npm install
53+ # COPY --from=build-service /service /sftpserviceplugin/node_modules/@ngageoint/mage.service
54+ # COPY plugins/sftp/service/ ./
55+ # RUN npm run build
56+ # RUN npm pack
5957
60- FROM node:20.11.1 AS build-sftpwebplugin
61- # Build sftp service plugin
62- WORKDIR /sftpwebplugin
63- COPY plugins/sftp/web/package*.json ./
64- RUN npm install
65- COPY plugins/sftp/web/ ./
66- RUN npm run build
67- RUN npm pack ./dist/main
58+ # FROM node:20.11.1 AS build-sftpwebplugin
59+ # # Build sftp service plugin
60+ # WORKDIR /sftpwebplugin
61+ # COPY plugins/sftp/web/package*.json ./
62+ # RUN npm install
63+ # COPY plugins/sftp/web/ ./
64+ # RUN npm run build
65+ # RUN npm pack ./dist/main
6866
6967# Build instance
7068FROM node:20.11.1 AS build-instance
7169COPY --from=build-service /service/ngageoint*.tgz /service/
7270COPY --from=build-webapp /web-app/ngageoint*.tgz /web-app/
73- COPY --from=build-arcwebplugin /arcgiswebplugin/ngageoint*.tgz /arcgiswebplugin/
74- COPY --from=build-arcserviceplugin /arcgisserviceplugin/ngageoint*.tgz /arcgisserviceplugin/
75- COPY --from=build-sftpserviceplugin /sftpserviceplugin/ngageoint*.tgz /sftpserviceplugin/
76- COPY --from=build-sftpwebplugin /sftpwebplugin/ngageoint*.tgz /sftpwebplugin/
77- COPY --from=build-imageserviceplugin /imageserviceplugin/ngageoint*.tgz /imageserviceplugin/
71+ # COPY --from=build-arcwebplugin /arcgiswebplugin/ngageoint*.tgz /arcgiswebplugin/
72+ # COPY --from=build-arcserviceplugin /arcgisserviceplugin/ngageoint*.tgz /arcgisserviceplugin/
73+ # COPY --from=build-sftpserviceplugin /sftpserviceplugin/ngageoint*.tgz /sftpserviceplugin/
74+ # COPY --from=build-sftpwebplugin /sftpwebplugin/ngageoint*.tgz /sftpwebplugin/
7875
79- WORKDIR /instance
80- RUN ls -la ../sftpwebplugin
81- RUN npm install ../service/ngageoint-mage.service*.tgz
82- RUN npm install ../web-app/ngageoint-mage.web-app*.tgz
83- RUN npm install ../sftpwebplugin/ngageoint-mage.sftp.web*.tgz
84- RUN npm install ../sftpserviceplugin/ngageoint-mage.sftp.service*.tgz
85- RUN npm install ../arcgiswebplugin/ngageoint*.tgz
86- RUN npm install ../arcgisserviceplugin/ngageoint*.tgz
87- RUN npm install ../imageserviceplugin/ngageoint*.tgz
76+ ENV MAGE_HOME=/home/mage/instance
77+ WORKDIR ${MAGE_HOME}
8878
79+ RUN npm install ../../../service/ngageoint-mage.service*.tgz
80+ RUN npm install ../../../web-app/ngageoint-mage.web-app*.tgz
81+ # RUN npm install ../../../sftpwebplugin/ngageoint-mage.sftp.web*.tgz
82+ # RUN npm install ../../../sftpserviceplugin/ngageoint-mage.sftp.service*.tgz
83+ # RUN npm install ../../../arcgiswebplugin/ngageoint*.tgz
84+ # RUN npm install ../../../arcgisserviceplugin/ngageoint*.tgz
85+ RUN ln -s ./node_modules/.bin/mage.service
8986
9087ENV NODE_PATH=./node_modules
91- ENTRYPOINT [ \
92- "./node_modules/.bin/mage.service" , \
93- "--plugin" , "@ngageoint/mage.image.service" , \
94- "--plugin" , "@ngageoint/mage.arcgis.service" , \
95- "--plugin" , "@ngageoint/mage.sftp.service" , \
96- "--web-plugin" , "@ngageoint/mage.sftp.web" , \
97- "--web-plugin" , "@ngageoint/mage.arcgis.web-app" \
98- ]
88+ ENTRYPOINT [ "./mage.service" ]
0 commit comments