@@ -8,15 +8,10 @@ RUN apt-get update \
88 && apt-get install -y --no-install-recommends chromium curl \
99 && rm -rf /var/lib/apt/lists/*
1010
11- # Use predefined node user (UID 1000, GID 1000)
12- # Set home directory ownership for node user
13- RUN usermod -d /fredy node
14-
1511ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
1612 PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
1713
1814# Copy lockfiles first to leverage cache for dependencies
19- COPY --chown=node:node package.json yarn.lock .
2015COPY package.json yarn.lock .
2116
2217# Set Yarn timeout, install dependencies and PM2 globally
@@ -25,14 +20,11 @@ RUN yarn config set network-timeout 600000 \
2520 && yarn global add pm2
2621
2722# Copy application source and build production assets
28- COPY --chown=node:node . .
2923COPY . .
3024RUN yarn build:frontend
3125
3226# Prepare runtime directories and symlinks for data and config
3327RUN mkdir -p /db /conf \
34- && chown -R node:node /fredy /db /conf \
35- && chmod 755 /db /conf \
3628 && chown 1000:1000 /db /conf \
3729 && chmod 777 /db /conf \
3830 && ln -s /db /fredy/db \
@@ -42,8 +34,5 @@ EXPOSE 9998
4234VOLUME /db
4335VOLUME /conf
4436
45- # Switch to non-root user
46- USER node
47-
4837# Start application using PM2 runtime
49- CMD ["pm2-runtime" , "index.js" ]
38+ CMD ["pm2-runtime" , "index.js" ]
0 commit comments