File size: 448 Bytes
9cdc472 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | FROM node:20-alpine
WORKDIR /app
# Install dependencies at image build time (faster container start)
COPY package*.json ./
RUN npm install --include=dev
# Install static file server
RUN npm install -g serve
# Copy source
COPY . .
EXPOSE 7860
# At container start: write the HF Secret into .env.local, build, then serve
CMD sh -c 'echo "GEMINI_API_KEY=$GEMINI_API_KEY" > .env.local && npm run build && serve -s dist -l 7860'
|