FROM node:20-alpine

WORKDIR /app/bot

COPY bot/package*.json ./
RUN npm install --omit=dev

COPY bot/ .

RUN mkdir -p /app/bot/logs && chown -R node:node /app/bot/logs

USER node

EXPOSE 4100

CMD ["node", "src/server.js"]
