File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,10 +54,20 @@ RUN apt-get update && apt-get install -y \
5454 xdg-utils \
5555 && rm -rf /var/lib/apt/lists/*
5656
57- # Install prod deps
57+ # Set working directory
58+ WORKDIR /app
59+
60+ # Install production dependencies
5861COPY package.json package-lock.json* ./
5962RUN npm ci --omit=dev
6063
64+ # Copy the dist folder
65+ COPY dist/ ./dist/
66+
67+ # Create symlink for server public folder at expected path
68+ RUN mkdir -p /app/liascript-exporter/server && \
69+ ln -s /app/dist/server/public /app/liascript-exporter/server/public
70+
6171# Install Puppeteer's Chrome explicitly
6272RUN npx puppeteer browsers install chrome
6373
@@ -67,12 +77,10 @@ RUN CHROME_PATH=$(find /root/.cache/puppeteer -name chrome -type f | head -n 1)
6777 echo "Chrome installed at: $CHROME_PATH" && \
6878 chmod +x /etc/profile.d/puppeteer.sh
6979
70- COPY dist/ liascript-exporter/
71-
7280# Create entrypoint script that sources the environment
7381RUN echo '#!/bin/sh\n \
7482 export PUPPETEER_EXECUTABLE_PATH=$(find /root/.cache/puppeteer -name chrome -type f | head -n 1)\n \
75- exec node liascript-exporter /index.js "$@"' > /entrypoint.sh && \
83+ exec node /app/dist /index.js "$@"' > /entrypoint.sh && \
7684 chmod +x /entrypoint.sh
7785
7886EXPOSE 4000
You can’t perform that action at this time.
0 commit comments