mirror of
https://github.com/f/awesome-chatgpt-prompts.git
synced 2026-06-27 14:26:03 +00:00
chore: make compose.yml support both pre-built images or building locally (#1184)
This commit is contained in:
34
DOCKER.md
34
DOCKER.md
@@ -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.
|
||||
|
||||
10
compose.yml
10
compose.yml
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user