File size: 893 Bytes
60e766b
 
e9b9a8f
 
 
 
60e766b
 
 
 
 
 
 
e9b9a8f
 
d438808
 
 
696be4b
 
106df7f
60e766b
 
 
e9b9a8f
 
60e766b
 
3bdacaf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM node:20-bookworm-slim

RUN apt-get update -y \
  && apt-get install -y --no-install-recommends openssl ca-certificates \
  && rm -rf /var/lib/apt/lists/*

WORKDIR /app

COPY package.json package-lock.json ./
RUN npm ci

COPY . .

ENV OPENAI_API_KEY=""
ENV OPENAI_MODEL="gpt-4.1-mini"
ENV AUTH_SECRET="change-me-in-production"
ENV AUTH_GOOGLE_ID=""
ENV AUTH_GOOGLE_SECRET=""
ENV AUTH_URL="https://jacksuyu-demandsolution-codex.hf.space"
ENV NEXTAUTH_URL="https://jacksuyu-demandsolution-codex.hf.space"
ENV AUTH_TRUST_HOST="true"
ENV NODE_ENV=production
ENV PORT=7860

RUN npm run prisma:generate && npm run build

EXPOSE 7860

CMD ["sh", "-lc", "if [ -z \"$DATABASE_URL\" ]; then echo 'DATABASE_URL is required (set it in HF secrets, e.g. Supabase Postgres URL)'; exit 1; fi; npx prisma db push --skip-generate && node scripts/cleanup_idea_copy.js && npm start -- -H 0.0.0.0 -p ${PORT}"]