-
Notifications
You must be signed in to change notification settings - Fork 641
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #144 from codebanesr/fix/prebuilt_images
Adding prebuilt images instead of rebuilding everytime
- Loading branch information
Showing
7 changed files
with
504 additions
and
1,675 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
docker login -u codebanesr | ||
|
||
<!-- llm-server --> | ||
docker build -t codebanesr/openchat_llm_server:tagname . | ||
docker push codebanesr/openchat_llm_server:tagname | ||
|
||
|
||
<!-- backend server --> | ||
docker build -t codebanesr/openchat_backend_server:latest . | ||
|
||
docker push codebanesr/openchat_backend_server:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
node_modules | ||
npm-debug.log | ||
yarn-error.log | ||
dist | ||
Dockerfile* | ||
docker-compose* | ||
README.md | ||
.git | ||
.gitignore | ||
.vscode | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,19 @@ | ||
# Use an official Node.js runtime as the base image | ||
FROM node:18 | ||
FROM node:18-alpine as builder | ||
WORKDIR /my-space | ||
|
||
# Set the working directory | ||
WORKDIR /usr/src/app | ||
|
||
# Copy package.json and yarn.lock | ||
COPY package*.json yarn.lock ./ | ||
|
||
COPY .env .env | ||
|
||
# Install dependencies | ||
COPY package.json yarn.lock ./ | ||
RUN yarn install | ||
|
||
# Copy the project files to the container | ||
COPY . . | ||
|
||
# Expose the container's port (if required by the app) | ||
|
||
# Start the app | ||
CMD [ "npm", "run", "dev" ] | ||
|
||
|
||
|
||
|
||
|
||
RUN npm run build | ||
|
||
FROM node:18-alpine as runner | ||
WORKDIR /my-space | ||
COPY --from=builder /my-space/package.json . | ||
COPY --from=builder /my-space/package-lock.json . | ||
COPY --from=builder /my-space/next.config.js ./ | ||
# COPY --from=builder /my-space/public ./public | ||
COPY --from=builder /my-space/.next/standalone ./ | ||
COPY --from=builder /my-space/.next/static ./.next/static | ||
|
||
EXPOSE 3000 | ||
CMD ["node", "server.js"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.