diff --git a/README.md b/README.md index 023d98ea27e..6f60a8d67c6 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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. diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 00000000000..a7421ce17c9 --- /dev/null +++ b/compose.yaml @@ -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