Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -907,6 +907,8 @@ Create a `DOTENV_LOCAL` secret to your HF space with the content of your .env.lo

## Building

### Local

To create a production version of your app:

```bash
Expand All @@ -917,6 +919,21 @@ You can preview the production build with `npm run preview`.

> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.

### Docker Compose

If `.env.local` is not present, remove the volume in `compose.yaml` as follows to avoid errors.

```diff
- volumes:
- - .env.local:/app/.env.local
```

Start the app with Docker Compose:

```bash
docker compose --env-file /dev/null up --build
```

## Config changes for HuggingChat

The config file for HuggingChat is stored in the `chart/env/prod.yaml` file. It is the source of truth for the environment variables used for our CI/CD pipeline. For HuggingChat, as we need to customize the app color, as well as the base path, we build a custom docker image. You can find the workflow here.
Expand Down
26 changes: 26 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
services:
mongo:
image: mongo:latest
expose:
- 27017
networks:
- huggingchat-mongo
restart: always

huggingchat:
image: chat-ui:latest
ports:
- "3000:3000"
depends_on:
- mongo
networks:
- huggingchat-mongo
volumes:
- .env.local:/app/.env.local
environment:
- MONGODB_URL=mongodb://mongo:27017
restart: always

networks:
huggingchat-mongo:
driver: bridge