From c6b0f5b27e4f2731145140cf7817365f53d64b93 Mon Sep 17 00:00:00 2001 From: apensotti Date: Fri, 31 Oct 2025 22:25:36 +0000 Subject: [PATCH 1/4] chore: update docker-compose.yml to persist SQLite data in /app/data and adjust README for clarity on configuration --- README.md | 29 +++++++++++------------------ docker-compose.yml | 2 +- 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index d8b5cea..495e64d 100644 --- a/README.md +++ b/README.md @@ -53,9 +53,10 @@ Pull and run with defaults (port 3000 inside the container): docker pull ghcr.io/openchatui/openchatui:latest docker run --name openchat \ -p 3000:3000 \ + -e PORT=3000 \ -e AUTH_URL="http://localhost:3000" \ -e AUTH_SECRET="$(openssl rand -base64 32)" \ - -v "$(pwd)/data/prisma:/prisma" \ + -v "$(pwd)/data:/app/data" \ --restart unless-stopped \ ghcr.io/openchatui/openchatui:latest ``` @@ -63,27 +64,15 @@ docker run --name openchat \ > [!TIP] > - Change the host port by editing the `-p` flag (e.g., `-p 3001:3001` together with `-e PORT=3001`). > - If you prefer PostgreSQL, add `-e DB=postgres -e DATABASE_URL=postgresql://user:pass@host:5432/dbname`. -> - The container will generate a `AUTH_SECRET` if not provided; set it for persistence across restarts. +> - Optional (persist SQLite outside the image): mount a host folder at `/app/data` and set `SQLITE_URL=file:/app/data/openchat.db` (DB defaults to sqlite in the image). Avoid mounting `/prisma` to prevent overriding bundled migrations. +> - The container will generate an `AUTH_SECRET` if not provided; set it for persistence across restarts. ##### Optional: Public landing (disable auth) Set `AUTH=false` to allow unauthenticated users to access the public landing page while keeping the `/admin` area protected and requiring admin login. -Examples: - -```bash -docker run \ - -p 3000:3000 \ - -e AUTH_URL="http://localhost:3000" \ - -e AUTH_SECRET="$(openssl rand -base64 32)" \ - -e AUTH=false \ - -v "$(pwd)/data/prisma:/prisma" \ - --restart unless-stopped \ - ghcr.io/openchatui/openchatui:latest -``` - #### Docker Compose -A ready-to-use `docker-compose.yml` is included. It maps port `3000` and persists SQLite data to `./prisma`. +A ready-to-use `docker-compose.yml` is included. It maps port `3000` and persists SQLite data to `./data` mounted at `/app/data`. Minimal compose file: ```yaml @@ -92,8 +81,12 @@ services: image: ghcr.io/openchatui/openchatui:latest ports: - "3000:3000" + environment: + PORT: "3000" + AUTH_URL: "http://localhost:3000" + AUTH_SECRET: "" volumes: - - ./prisma:/prisma + - ./data:/app/data restart: unless-stopped ``` @@ -109,7 +102,7 @@ docker compose down > [!TIP] > - Change the external port by editing `ports` and the internal app port by `environment: PORT` and `AUTH_URL`. -> - Persist data: by default `./prisma:/prisma` stores the SQLite database on the host. +> - Optional (persist SQLite outside the image): mount `./data:/app/data` and set `SQLITE_URL=file:/app/data/openchat.db` (DB defaults to sqlite in the image). Avoid mounting `/prisma` to prevent overriding bundled migrations. > - Switch to PostgreSQL: set `DB=postgres` and provide `DATABASE_URL` in `environment`. You can add a separate Postgres service if needed. # Features diff --git a/docker-compose.yml b/docker-compose.yml index ad06c1d..2c0947c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,7 +15,7 @@ services: AUTH: "true" DEBUG_AUTH: "true" # DB: "sqlite" - # SQLITE_URL: "file:/app/prisma/dev.db" + # SQLITE_URL: "file:/app/data/openchat.db" # DATABASE_URL: "postgresql://user:pass@host/db" # NODE_ENV: "production" # OPENAI_API_KEY: "sk-..." From adab9d1be7f298e6dfeb0a59396c6daf2cc88078 Mon Sep 17 00:00:00 2001 From: apensotti Date: Fri, 31 Oct 2025 22:33:12 +0000 Subject: [PATCH 2/4] chore: update file paths in .gitignore and route.ts to reflect new data structure and adjust docker-compose.yml for profile storage --- .gitignore | 2 +- app/api/v1/users/profile-image/route.ts | 2 +- docker-compose.yml | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 9b9d7e0..8e7a485 100644 --- a/.gitignore +++ b/.gitignore @@ -43,7 +43,7 @@ prisma/*_data.csv *.tsbuildinfo next-env.d.ts -public/profiles/* +/data/profiles/* /data/images/* /data/prisma/* /data/files/* diff --git a/app/api/v1/users/profile-image/route.ts b/app/api/v1/users/profile-image/route.ts index ae8fa39..084762e 100644 --- a/app/api/v1/users/profile-image/route.ts +++ b/app/api/v1/users/profile-image/route.ts @@ -63,7 +63,7 @@ export async function POST(request: NextRequest): Promise { const filePath = path.join(profilesDir, filename) await writeFile(filePath, buffer) - const url = `/profiles/${filename}` + const url = `/data/profiles/${filename}` return NextResponse.json({ url }) } catch (error) { return NextResponse.json({ error: "Upload failed" }, { status: 500 }) diff --git a/docker-compose.yml b/docker-compose.yml index 2c0947c..c658210 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -25,5 +25,4 @@ services: # DRIVE_CLIENT_SECRET: "your-google-client-secret" volumes: - ./data:/app/data - - ./public/profiles:/app/public/profiles restart: unless-stopped From 9d8c9bad349967614cee207a6e4b44eea7c1c505 Mon Sep 17 00:00:00 2001 From: apensotti Date: Fri, 31 Oct 2025 23:59:55 +0000 Subject: [PATCH 3/4] chore: move icon files to app/ --- {public => app}/apple-icon.png | Bin {public => app}/icon.png | Bin 2 files changed, 0 insertions(+), 0 deletions(-) rename {public => app}/apple-icon.png (100%) rename {public => app}/icon.png (100%) diff --git a/public/apple-icon.png b/app/apple-icon.png similarity index 100% rename from public/apple-icon.png rename to app/apple-icon.png diff --git a/public/icon.png b/app/icon.png similarity index 100% rename from public/icon.png rename to app/icon.png From 02f9e71b22b2ef8915dc6efdb32dc7f444a2572b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 1 Nov 2025 00:01:19 +0000 Subject: [PATCH 4/4] RELEASE: Update v0.1.28 CHANGELOG --- CHANGELOG.md | 11 +++++++++++ package.json | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d53a9d9..37c5244 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +## [0.1.28] - 2025-11-01 + +### PR: [Dev](https://github.com/openchatui/openchat/pull/102) + +### Fixed +- Moved app icons to the app/ directory so icons load correctly in Next.js. (https://github.com/openchatui/openchat/commit/9d8c9bad349967614cee207a6e4b44eea7c1c505) + +### Changed +- Updated docker-compose to persist SQLite at /app/data and clarified README setup and environment variables. (https://github.com/openchatui/openchat/commit/c6b0f5b27e4f2731145140cf7817365f53d64b93) +- Switched profile storage to /data and updated the upload endpoint to return /data/profiles URLs; adjusted .gitignore accordingly. (https://github.com/openchatui/openchat/commit/adab9d1be7f298e6dfeb0a59396c6daf2cc88078) + ## [0.1.27] - 2025-10-31 ### PR: [Dev](https://github.com/openchatui/openchat/pull/98) diff --git a/package.json b/package.json index 425e5e7..df811cc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "openchatui", - "version": "0.1.27", + "version": "0.1.28", "private": true, "scripts": { "dev": "next dev --turbopack",