hystax / optscale

FinOps and cloud cost optimization tool. Supports AWS, Azure, GCP, Alibaba Cloud and Kubernetes.

Home Page:https://hystax.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ngui: Invalid Dockerfile & missing dependencies production

tguisep opened this issue · comments

Hello,

I built the ngui image, but I had to face two issues:

First issue:
https://github.com/hystax/optscale/blob/integration/ngui/Dockerfile#L22
RUN ./scripts/prune_node_modules.sh not found.

Fix done:

# -------- Server --------
WORKDIR /usr/src/app/server
COPY server/package*.json ./
RUN npm ci --ignore-scripts
COPY server/ ./
++ COPY scripts/ ./
-- RUN ./scripts/prune_node_modules.sh
++ RUN ./prune_node_modules.sh
RUN npm run compile

Second issue:
https://github.com/hystax/optscale/blob/integration/ngui/Dockerfile#L8

ENV NODE_ENV production is not compatible with :

"extends": ["eslint:recommended", "plugin:react/recommended", "airbnb-base", "prettier"],

"airbnb-base", "prettier" dependencies are missing with "production".
"eslint-config-airbnb": "^19.0.1",
"eslint-config-prettier": "^8.3.0",

Quick fix applied on my side:
ENV NODE_ENV development

Thomas.

After updates, I could build without issues.
Fixed.