-
Notifications
You must be signed in to change notification settings - Fork 29
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
OPEN_AI_MODEL= | ||
OPEN_AI_KEY= | ||
TELEGRAM_TOKEN= | ||
EMBEDDINGS_BEARER_TOKEN= | ||
STORAGE_NAME= | ||
STORAGE_URL= | ||
STORAGE_KEY= | ||
STORAGE_SECRET= | ||
DATASTORE= | ||
PINECONE_API_KEY= | ||
PINECONE_ENVIRONMENT= | ||
PINECONE_INDEX= |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Use an official Node.js runtime as a parent image | ||
FROM node:14-alpine | ||
|
||
# Set working directory | ||
WORKDIR /app | ||
|
||
# Copy the package.json and package-lock.json files to the working directory | ||
COPY package*.json ./ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep, lets make this change 👍 |
||
|
||
# Install app dependencies | ||
RUN npm install | ||
|
||
# Copy the rest of the app files to the working directory | ||
COPY . . | ||
|
||
# Expose port 3000 | ||
EXPOSE 3000 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I made the same mistake in my Dockerfile, but the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, lets set a PORT env var please |
||
|
||
# Start the app | ||
CMD ["node", "index.js"] |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 👍
There was a problem hiding this comment.
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 thepackage.json