mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 00:40:14 +01:00
Merge branch 'main' into search-final
This commit is contained in:
commit
aacc292522
8 changed files with 96 additions and 96 deletions
2
.dockerignore
Normal file
2
.dockerignore
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
**/node_modules
|
||||||
|
**/.env
|
||||||
35
Dockerfile
Normal file
35
Dockerfile
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
FROM node:19-alpine AS react-client
|
||||||
|
WORKDIR /client
|
||||||
|
# copy package.json into the container at /client
|
||||||
|
COPY /client/package*.json /client/
|
||||||
|
# install dependencies
|
||||||
|
RUN npm ci
|
||||||
|
# Copy the current directory contents into the container at /client
|
||||||
|
COPY /client/ /client/
|
||||||
|
# Build webpack artifacts
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
FROM node:19-alpine AS node-api
|
||||||
|
WORKDIR /api
|
||||||
|
# copy package.json into the container at /api
|
||||||
|
COPY /api/package*.json /api/
|
||||||
|
# install dependencies
|
||||||
|
RUN npm ci
|
||||||
|
# Copy the current directory contents into the container at /api
|
||||||
|
COPY /api/ /api/
|
||||||
|
# Copy the client side code
|
||||||
|
COPY --from=react-client /client/public /client/public
|
||||||
|
# Make port 3080 available to the world outside this container
|
||||||
|
EXPOSE 3080
|
||||||
|
# Expose the server to 0.0.0.0
|
||||||
|
ENV HOST=0.0.0.0
|
||||||
|
# Run the app when the container launches
|
||||||
|
CMD ["npm", "start"]
|
||||||
|
|
||||||
|
# Optional: for client with nginx routing
|
||||||
|
FROM nginx:stable-alpine AS nginx-client
|
||||||
|
WORKDIR /usr/share/nginx/html
|
||||||
|
COPY --from=react-client /client/public /usr/share/nginx/html
|
||||||
|
# Add your nginx.conf
|
||||||
|
COPY /client/nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
ENTRYPOINT ["nginx", "-g", "daemon off;"]
|
||||||
25
README.md
25
README.md
|
|
@ -7,6 +7,19 @@ https://user-images.githubusercontent.com/110412045/223754183-8b7f45ce-6517-4bd5
|
||||||
This project was started early in Feb '23, anticipating the release of the official ChatGPT API from OpenAI, and now uses it. Through this clone, you can avoid ChatGPT Plus in favor of free or pay-per-call APIs. I will soon deploy a demo of this app. Feel free to contribute, clone, or fork. Currently dockerized.
|
This project was started early in Feb '23, anticipating the release of the official ChatGPT API from OpenAI, and now uses it. Through this clone, you can avoid ChatGPT Plus in favor of free or pay-per-call APIs. I will soon deploy a demo of this app. Feel free to contribute, clone, or fork. Currently dockerized.
|
||||||
|
|
||||||
## Updates
|
## Updates
|
||||||
|
<details open>
|
||||||
|
<summary><strong>2023-03-22</strong></summary>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
**Released [v0.0.6](https://github.com/danny-avila/chatgpt-clone/releases/tag/v0.0.6)**, the latest stable release before **Searching messages** goes live tomorrow. See exact updates to date in the tag link. By request, there is now also a **[community discord server](https://discord.gg/NGaa9RPCft)**
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<summary><strong>Previous Updates</strong></summary>
|
||||||
|
<details>
|
||||||
|
<details>
|
||||||
|
<details>
|
||||||
<summary><strong>2023-03-20</strong></summary>
|
<summary><strong>2023-03-20</strong></summary>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -18,9 +31,6 @@ The above features are next and then I will have to focus on building the **test
|
||||||
On that note, I had to switch the default branch due to some breaking changes that haven't been straight forward to debug, mainly related to node-chat-gpt the main dependency of the project. Thankfully, my working branch, now switched to default as main, is working as expected.
|
On that note, I had to switch the default branch due to some breaking changes that haven't been straight forward to debug, mainly related to node-chat-gpt the main dependency of the project. Thankfully, my working branch, now switched to default as main, is working as expected.
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details>
|
|
||||||
<details>
|
|
||||||
<details>
|
<details>
|
||||||
<summary><strong>2023-03-16</strong></summary>
|
<summary><strong>2023-03-16</strong></summary>
|
||||||
|
|
||||||
|
|
@ -61,8 +71,6 @@ Due to increased interest in the repo, I've dockerized the app as of this update
|
||||||
|
|
||||||
Also worth noting, the method to access the Free Version is no longer working, so I've removed it from model selection until further notice.
|
Also worth noting, the method to access the Free Version is no longer working, so I've removed it from model selection until further notice.
|
||||||
</details>
|
</details>
|
||||||
<summary><strong>Previous Updates</strong></summary>
|
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary><strong>2023-03-04</strong></summary>
|
<summary><strong>2023-03-04</strong></summary>
|
||||||
Custom prompt prefixing and labeling is now supported through the official API. This nets some interesting results when you need ChatGPT for specific uses or entertainment. Select 'CustomGPT' in the model menu to configure this, and you can choose to save the configuration or reference it by conversation. Model selection will change by conversation.
|
Custom prompt prefixing and labeling is now supported through the official API. This nets some interesting results when you need ChatGPT for specific uses or entertainment. Select 'CustomGPT' in the model menu to configure this, and you can choose to save the configuration or reference it by conversation. Model selection will change by conversation.
|
||||||
|
|
@ -324,7 +332,12 @@ This means my implementation or the underlying model may not behave exactly the
|
||||||
- This works in a similar way to ChatGPT, except I'm pretty sure they have some additional way of retrieving context from earlier messages when needed (which can probably be achieved with embeddings, but I consider that out-of-scope for now).
|
- This works in a similar way to ChatGPT, except I'm pretty sure they have some additional way of retrieving context from earlier messages when needed (which can probably be achieved with embeddings, but I consider that out-of-scope for now).
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
If you'd like to contribute, please create a pull request with a detailed description of your changes.
|
|
||||||
|
Contributions and suggestions welcome! Bug reports and fixes are welcome!
|
||||||
|
|
||||||
|
For new features, components, or extensions, please open an issue and discuss before sending a PR.
|
||||||
|
|
||||||
|
- Join the [Discord community](https://discord.gg/NGaa9RPCft)
|
||||||
|
|
||||||
## License
|
## License
|
||||||
This project is licensed under the MIT License.
|
This project is licensed under the MIT License.
|
||||||
|
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
/node_modules
|
|
||||||
.env
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
FROM node:19-alpine
|
|
||||||
WORKDIR /api
|
|
||||||
# copy package.json into the container at /api
|
|
||||||
COPY package*.json /api/
|
|
||||||
# install dependencies
|
|
||||||
RUN npm ci
|
|
||||||
# Copy the current directory contents into the container at /api
|
|
||||||
COPY . /api/
|
|
||||||
# Make port 3080 available to the world outside this container
|
|
||||||
EXPOSE 3080
|
|
||||||
# Expose the server to 0.0.0.0
|
|
||||||
ENV HOST=0.0.0.0
|
|
||||||
# Run the app when the container launches
|
|
||||||
CMD ["npm", "start"]
|
|
||||||
|
|
||||||
# docker build -t node-api .
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
/node_modules
|
|
||||||
.env
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
# Stage 1
|
|
||||||
FROM node:19-alpine as builder
|
|
||||||
WORKDIR /client
|
|
||||||
# copy package.json into the container at /client
|
|
||||||
COPY package*.json /client/
|
|
||||||
# install dependencies
|
|
||||||
RUN npm ci
|
|
||||||
# Copy the current directory contents into the container at /client
|
|
||||||
COPY . /client/
|
|
||||||
# Build webpack artifacts
|
|
||||||
RUN npm run build
|
|
||||||
|
|
||||||
# Stage 2
|
|
||||||
FROM nginx:stable-alpine
|
|
||||||
WORKDIR /usr/share/nginx/html
|
|
||||||
RUN rm -rf ./*
|
|
||||||
COPY --from=builder /client/public /usr/share/nginx/html
|
|
||||||
# Add your nginx.conf
|
|
||||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
||||||
ENTRYPOINT ["nginx", "-g", "daemon off;"]
|
|
||||||
|
|
||||||
# docker build -t react-client .
|
|
||||||
|
|
@ -1,50 +1,42 @@
|
||||||
version: "2"
|
version: "3.4"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
client:
|
# client:
|
||||||
image: react-client
|
# image: nginx-client
|
||||||
build: ./client
|
# build:
|
||||||
restart: always
|
# context: .
|
||||||
ports:
|
# target: nginx-client
|
||||||
- "3080:80"
|
# restart: always
|
||||||
volumes:
|
# ports:
|
||||||
- ./client:/client
|
# - 3080:80
|
||||||
- /client/node_modules
|
# volumes:
|
||||||
links:
|
# - /client/node_modules
|
||||||
- api
|
# depends_on:
|
||||||
networks:
|
# - api
|
||||||
- webappnetwork
|
api:
|
||||||
api:
|
ports:
|
||||||
image: node-api
|
- 3080:3080 # Change it to 9000:3080 if you want to use nginx
|
||||||
build: ./api
|
depends_on:
|
||||||
restart: always
|
- mongodb
|
||||||
env_file:
|
image: node-api
|
||||||
- ./api/.env
|
build:
|
||||||
environment:
|
context: .
|
||||||
- HOST=0.0.0.0
|
target: node-api
|
||||||
- NODE_ENV=production
|
restart: always
|
||||||
- MONGO_URI=mongodb://mongodb:27017/chatgpt-clone
|
env_file:
|
||||||
ports:
|
- ./api/.env
|
||||||
- "9000:3080"
|
environment:
|
||||||
volumes:
|
- HOST=0.0.0.0
|
||||||
- ./api:/api
|
- NODE_ENV=production
|
||||||
- /api/node_modules
|
- MONGO_URI=mongodb://mongodb:27017/chatgpt-clone
|
||||||
depends_on:
|
volumes:
|
||||||
- mongodb
|
- /client/node_modules
|
||||||
networks:
|
- ./api:/api
|
||||||
- webappnetwork
|
- /api/node_modules
|
||||||
mongodb:
|
mongodb:
|
||||||
image: mongo
|
image: mongo
|
||||||
restart: always
|
restart: always
|
||||||
container_name: mongodb
|
container_name: mongodb
|
||||||
volumes:
|
volumes:
|
||||||
- ./data-node:/data/db
|
- ./data-node:/data/db
|
||||||
ports:
|
command: mongod --noauth
|
||||||
- 27020:27017
|
|
||||||
command: mongod --noauth
|
|
||||||
networks:
|
|
||||||
- webappnetwork
|
|
||||||
|
|
||||||
networks:
|
|
||||||
webappnetwork:
|
|
||||||
driver: bridge
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue