g2api / Dockerfile
LerinaOwO's picture
Update Dockerfile
6df40b1 verified
raw
history blame contribute delete
739 Bytes
FROM node:20-bullseye
ENV DEBIAN_FRONTEND=noninteractive
ENV PORT=7860
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 \
make \
g++ \
wget \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY package*.json ./
COPY stealth-proxy/package*.json ./stealth-proxy/
RUN npm ci
RUN cd stealth-proxy && npm ci
COPY . .
RUN npm run build
RUN npx playwright install chromium --with-deps
RUN useradd --system --create-home appuser \
&& mkdir -p /app/logs /ms-playwright \
&& chmod +x /app/start.sh \
&& chown -R appuser:appuser /app /ms-playwright
ENV NODE_ENV=production
USER appuser
EXPOSE 7860
CMD ["./start.sh"]