chore: make compose.yml support both pre-built images or building locally (#1184)

This commit is contained in:
Arda Kılıçdağı
2026-05-13 00:16:39 +03:00
committed by GitHub
parent c068d70062
commit 6da77cb902
2 changed files with 25 additions and 19 deletions

View File

@@ -2,32 +2,27 @@
Run your own prompts.chat instance using Docker Compose.
[`compose.yml`](/compose.yml) supports both the pre-built container image being fetched from ghcr.io, or being built locally.
## Quick Start
### To build locally
```bash
git clone https://github.com/f/prompts.chat.git
cd prompts.chat
docker compose up -d
docker compose up -d --build
```
Open http://localhost:4444 in your browser.
## Using a Pre-built Image
### Using a Pre-built Image
Edit `compose.yml` and replace the `build` block with the published image:
```yaml
services:
app:
# build:
# context: .
# dockerfile: docker/Dockerfile
image: ghcr.io/f/prompts.chat:latest
```
Then run:
Simply remove the `--build` flag from the command:
```bash
git clone https://github.com/f/prompts.chat.git
cd prompts.chat
docker compose up -d
```
@@ -45,6 +40,17 @@ docker run -d \
prompts.chat
```
Or if you simply want to use the pre-built image:
```bash
docker run -d \
--name prompts \
-p 4444:3000 \
-e DATABASE_URL="postgresql://user:pass@your-db-host:5432/prompts?schema=public" \
-e AUTH_SECRET="$(openssl rand -base64 32)" \
ghcr.io/f/prompts.chat:latest
```
## Custom Branding
All branding is configured via `PCHAT_*` environment variables at runtime -- no rebuild needed.

View File

@@ -18,11 +18,11 @@ services:
app:
image: ghcr.io/f/prompts.chat:latest
# To build locally instead of using the pre-built image, comment out
# the 'image' line above and uncomment the build block below:
# build:
# context: .
# dockerfile: docker/Dockerfile
# By default, uses the pre-built image above. To build locally instead,
# run: docker compose up -d --build
build:
context: .
dockerfile: docker/Dockerfile
restart: unless-stopped
ports:
- "${PORT:-4444}:3000"