9 months ago
Today my deployments stopped working, always hanging on npm install. I've made a bunch of changes to try to solve it, but I couldn't fix yet. Could you help me?
Everything was working perfectly until today.
My dockerfile:
FROM --platform=linux/amd64 node:20.11.0
RUN apt-get update && apt-get install gnupg wget -y && \
wget -q -O- https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/google-archive.gpg && \
sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && \
apt-get update && \
apt-get install google-chrome-stable -y --no-install-recommends && \
rm -rf /var/lib/apt/lists/*
# We don't need the standalone Chromium
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
WORKDIR /app
COPY package*.json ./
ARG NODE_ENV=development
ENV NODE_ENV=${NODE_ENV}
RUN npm ci --include=dev
COPY . .
RUN if [ "$NODE_ENV" = "production" ] || [ "$NODE_ENV" = "staging" ]; then npm run build; fi
CMD if [ "$NODE_ENV" = "production" ] || [ "$NODE_ENV" = "staging" ]; \
then sleep 3 && npm run start:main; \
else npm run start:dev; \
fi
0 Replies
9 months ago
build logs please -
9 months ago
can you share your package.json too please
9 months ago
i assume this dockerfile builds locally?
9 months ago
is using browserless on the table for you? im thinking the hanging has to do with installing chrome
9 months ago
I'm not sure how that would prevent you from using browserless
9 months ago
puppeteer itself is installing chrome too, hence why I think it's freezing
9 months ago
how many builds do you have at once?
9 months ago
do you have wait for ci enabled?
9 months ago
no problem!