FROM node:21-alpine
WORKDIR /app
RUN mkdir -p /var/sqlite
COPY package.json .
RUN npm install
COPY . .
RUN npm run migrate
RUN npm run build
ENV HOST=0.0.0.0
ENV PORT=8000
EXPOSE 8000
CMD ["dist/server/entry.mjs"]