Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

basic dockerfile with usage #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AntonioDeJesus
Copy link

Dockerfile with build instructions in README to build and run locally.

Uses container.env file for easier input of third party keys

@Jivings
Copy link
Contributor

Jivings commented May 13, 2023

Forgive me but I have no clue how to use Docker.

But it looks like it's just including the main app, but we should also launch the embeddings server (https://github.com/openai/chatgpt-retrieval-plugin) as part of the container right?

The DigitalOcean button deploys both things.

@stvcooke
Copy link

stvcooke commented May 13, 2023

@Jivings,

The embeddings server is a separate container image. That Dockerfile is located at https://github.com/openai/chatgpt-retrieval-plugin. Something like docker compose could be used to deploy both locally, but so could other tools.

WORKDIR /app

# Copy the package.json and package-lock.json files to the working directory
COPY package*.json ./

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The repository contains a yarn.lock file, so it should grab that file and install with yarn instead of npm install to grab the frozen dependencies.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, lets make this change 👍

COPY . .

# Expose port 3000
EXPOSE 3000

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made the same mistake in my Dockerfile, but the index.js is using an environment variable PORT to set the port, or defaulting to 1333. So this should be 1333 or a PORT environment variable should be set in the Dockerfile.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, lets set a PORT env var please

@AntonioDeJesus
Copy link
Author

@Jivings,

The embeddings server is a separate container image. That Dockerfile is located at https://github.com/openai/chatgpt-retrieval-plugin. Something like docker compose could be used to deploy both locally, but so could other tools.

Can do a swarm doc or helm chart, helm chart will take a bit more time to piece together and test. I can build off your PR or mine, lmk

@Jivings
Copy link
Contributor

Jivings commented May 14, 2023

If it makes sense to just have this one then lets roll with this for now and can build on it later

@@ -0,0 +1,20 @@
# Use an official Node.js runtime as a parent image
FROM node:14-alpine

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Node 14 is now EOL. The most recent LTS version is node:18.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm also developing and testing on 18 👍

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok min version is 16, I just added nvmrc file and engines prop in the package.json

@Jivings
Copy link
Contributor

Jivings commented May 15, 2023

If @AntonioDeJesus doesn't get back to us, feel free to re-open your PR @stvcooke

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants