FROM node:18-alpine

WORKDIR /app

COPY .next ./.next
COPY node_modules ./node_modules
COPY package.json package-lock.json* ./
COPY public ./public

ENV NODE_ENV=production
# Google Analytics 环境变量
ENV NEXT_PUBLIC_GA_MEASUREMENT_ID=G-4BDXV6TWF4
ENV NEXT_PUBLIC_GA_ENABLED=true

EXPOSE 3000

CMD ["yarn", "start"]