Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Commit

Permalink
Fix docker
Browse files Browse the repository at this point in the history
  • Loading branch information
leordev committed Dec 20, 2023
1 parent 9668f41 commit acadd9d
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/publish-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

jobs:
push_to_registry:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ WORKDIR /app
COPY . /app

RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir --user Flask Flask_cors PyYAML openai waitress
pip install --no-cache-dir --user -r requirements.txt

# Runtime stage
FROM python:3.9-slim as runtime
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ ASK_QUERY=$(sed "s/ /%20/g" <<<"$ASK_QUERY") # encodes whitespaces
curl "http://localhost:5003/ask_chat?query=$ASK_QUERY"
```

## Running with Docker

1. Install docker on your computer
2. Set the OPENAI_API_KEY in the `docker-compose.yaml` file
3. Execute `docker compose up`

## Deployment settings

Environment variables used in the server:
Expand Down
12 changes: 12 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: "3"

services:
app:
build:
context: .
dockerfile: Dockerfile
ports:
- "5003:5003"
environment:
OPENAI_API_KEY: ${OPENAI_API_KEY}
WEB5GPT_MONTHLY_USAGE_LIMIT_USD: 30

0 comments on commit acadd9d

Please sign in to comment.