Bayer-Group / COLID-Setup

The setup repository is part of the Corporate Linked Data Catalog - short: COLID - application. It helps setting up a local environment based on Docker Compose.
https://bayer-group.github.io/COLID-Documentation/
BSD 3-Clause "New" or "Revised" License
15 stars 6 forks source link

KGE-Web-Service not running with docker-compose #2

Closed lavdim closed 2 years ago

lavdim commented 2 years ago

Hello,

I tried out to install COLID via docker-compose. During the container creation phase the KGE-Web-Service failed to be built, showing the following error:

image

Looking at the Dockerfile:

` FROM node:10-alpine as build-phase ENV PORT=8080 ENV NODE_ENV="docker" COPY package.json package-lock.json ./

Storing node modules on a separate layer will prevent unnecessary npm installs at each build

RUN npm install \ && mkdir /ng-app \ && cp -R ./node_modules ./ng-app

3 against vulnerable packages

RUN npm audit fix

WORKDIR /ng-app

COPY . . `

it seems that only the package.json file is copied from host to the guest. Further, the dist folder based on the typescript sources folder is not generated.

Therefore, I modified a little bit the Dockerfile by copying the entire folder of the sources to the host and running the command for generating the dist folder:

` FROM node:10-alpine as build-phase ENV PORT=8080 ENV NODE_ENV="docker"

COPY package.json package-lock.json ./

RUN mkdir /ng-app COPY . ./ng-app

Storing node modules on a separate layer will prevent unnecessary npm installs at each build

RUN cd ./ng-app \ && npm install \ && npm audit fix \ && ./node_modules/.bin/tsc

3 against vulnerable packages

RUN npm audit fix

WORKDIR /ng-app

COPY . .
`

Now, it seems that the container can be with no issue.

kanwalmeet commented 2 years ago

Hi Lavdim, I have made some fixes and will check and revert asap

kanwalmeet commented 2 years ago

made some fixes and will check and revert asap