CoolFace
Apppublic

dia-gov/AgentGPT-Web-GUI

sourceHugging Facemitupdated 2y agoView on Hugging Face
0likes
dev.Dockerfile62 linesDownload Raw Back to root
1FROM node:19-alpine2 3RUN apk update && apk add --no-cache openssl4 5ARG NEXTAUTH_SECRET=$(openssl rand -base64 32)6ENV NEXTAUTH_SECRET=$NEXTAUTH_SECRET7 8ARG DATABASE_URL9ENV DATABASE_URL=$DATABASE_URL10 11ARG NEXTAUTH_SECRET=12ENV NEXTAUTH_SECRET=$NEXTAUTH_SECRET13 14ARG NEXTAUTH_URL15ENV NEXTAUTH_URL=$NEXTAUTH_URL16 17ARG SKIP_ENV_VALIDATION18ENV SKIP_ENV_VALIDATION=$SKIP_ENV_VALIDATION19 20WORKDIR /app21 22# Ensure the app module is copied to the correct location23COPY app.py /app/app.py24 25# Install dependencies based on the preferred package manager26COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./27 28# Copy the rest of the application code29COPY . .30 31# Prevent Husky errors by disabling the `prepare` script32RUN npm pkg set scripts.prepare="exit 0"33 34# set npm registry35RUN npm config set registry 'https://registry.npmmirror.com/'36 37RUN \38  if [ -f yarn.lock ]; then yarn --frozen-lockfile; \39  elif [ -f package-lock.json ]; then npm ci; \40  elif [ -f pnpm-lock.yaml ]; then yarn global add pnpm && pnpm i; \41  # Allow install without lockfile, so example works even without Node.js installed locally42  else echo "Warning: Lockfile not found. It is recommended to commit lockfiles to version control." && yarn install; \43  fi44 45# Ensure the app module is in the Python path46ENV PYTHONPATH="/app:${PYTHONPATH}"47 48ENTRYPOINT ["sh", "entrypoint.sh"]49 50# Next.js collects completely anonymous telemetry data about general usage. Learn more here: https://nextjs.org/telemetry51# Uncomment the following line to disable telemetry at run time52# ENV NEXT_TELEMETRY_DISABLED 153 54# Note: Don't expose ports here, Compose will handle that for us55 56# Start Next.js in development mode based on the preferred package manager57CMD \58  if [ -f yarn.lock ]; then yarn dev; \59  elif [ -f package-lock.json ]; then npm run dev; \60  elif [ -f pnpm-lock.yaml ]; then pnpm dev; \61  else yarn dev; \62  fi