Closed oktaborg closed 1 year ago
You will need to build your own dockerfile. Recommend using node image with version 18 or higher and make sure to expose port 3000 to be able to access gui in browser.
Is there any plan to release it as a docker?
Add Docker support #296
I was able to get it to run in a docker container on fly.io. It took only a few minutes. The flyctl generated a dockerfile automatically.
# Install dependencies only when needed
FROM node:18-alpine AS builder
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY . .
RUN yarn install --frozen-lockfile
# If using npm with a `package-lock.json` comment out above and use below instead
# RUN npm ci
ENV NEXT_TELEMETRY_DISABLED 1
# Add `ARG` instructions below if you need `NEXT_PUBLIC_` variables
# then put the value on your fly.toml
# Example:
# ARG NEXT_PUBLIC_EXAMPLE="value here"
RUN yarn build
# If using npm comment out above and use below instead
# RUN npm run build
# Production image, copy all the files and run next
FROM node:18-alpine AS runner
WORKDIR /app
ENV NODE_ENV production
ENV NEXT_TELEMETRY_DISABLED 1
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
COPY --from=builder /app ./
USER nextjs
CMD ["yarn", "start"]
# If using npm comment out above and use below instead
# CMD ["npm", "run", "start"]
Hi, @oktaborg! I'm Dosu, and I'm helping the gpt4-pdf-chatbot-langchain team manage their backlog. I wanted to let you know that we are marking this issue as stale.
From what I understand, you were asking if the project can be run as a Docker container. There have been some helpful suggestions in the comments. spacepirate0001 suggested building a Dockerfile using a node image with version 18 or higher and exposing port 3000. wmgillett mentioned successfully running it in a Docker container on fly.io using the flyctl, which generated a Dockerfile automatically. krazyjakee also provided a Dockerfile example.
Before we close this issue, we wanted to check with you if it is still relevant to the latest version of the gpt4-pdf-chatbot-langchain repository. If it is, please let us know by commenting on the issue. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days.
Thank you for your contribution, and please don't hesitate to reach out if you have any further questions or concerns!
Can I run this as a docker.