FROM node:20-alpine

WORKDIR /app

COPY package.json package-lock.json* ./
RUN npm install --legacy-peer-deps

COPY . .

ENV NEXT_PUBLIC_API_URL=http://app:5000
ENV PORT=3000

EXPOSE 3000

CMD ["npx", "next", "dev", "--hostname", "0.0.0.0"]
