dynrat / Dockerfile
DmaxG's picture
Update Dockerfile
14bea9c verified
raw
history blame contribute delete
789 Bytes
FROM node:20-alpine
WORKDIR /app
# System deps (git for cloning, fonts for rendering)
RUN apk add --no-cache git fontconfig ttf-dejavu ttf-freefont font-noto
# Fetch the app source
RUN git clone https://github.com/OlinadWiz/dynrat.git .
# Install deps and build
RUN npm ci
RUN npm run build
# Ensure static assets are available when running the standalone server
RUN mkdir -p /app/.next/standalone/.next \
&& cp -r /app/.next/static /app/.next/standalone/.next/ \
&& if [ -d /app/public ]; then cp -r /app/public /app/.next/standalone/public; fi
# Runtime config
ENV NODE_ENV=production
ENV PORT=7860
# Persist cache/db (HF persistent storage can be mounted at /data if enabled)
RUN mkdir -p /app/data
VOLUME ["/app/data"]
EXPOSE 7860
CMD ["node", ".next/standalone/server.js"]