Sign inSign up

shilazi/pandora

By shilazi

•Updated almost 3 years ago

https://github.com/zhile-io/pandora

Image
0

126

shilazi/pandora repository overview

⁠Mirror

Mirror of https://hub.docker.com/r/pengzhile/pandora⁠

⁠Usage

Use docker-compose

version: '3'

services:
  pandora:
    image: shilazi/pandora:1.3.5
    ports:
    - 8080:8080
    environment:
    - TZ=Asia/Shanghai
    - PANDORA_SERVER=0.0.0.0:8080
    - PANDORA_VERBOSE=1
    - PANDORA_CLOUD=1
    - OPENAI_API_PREFIX=https://api.openai.com
    - CHATGPT_API_PREFIX=https://ai.fakeopen.com
    volumes:
    - ./data:/data
    restart: unless-stopped

Sometime, then pandora default CHATGPT_API_PREFIX not available, can use go-chatgpt-api as replacement.

Example: work with go-chatgpt-api⁠ and nginx⁠ without CORS.

version: '3'

services:
  pandora:
    image: shilazi/pandora:1.3.5
    ports:
    - 127.0.0.1:8080:8080
    environment:
    - TZ=Asia/Shanghai
    - PANDORA_SERVER=0.0.0.0:8080
    - PANDORA_VERBOSE=1
    - PANDORA_CLOUD=1
    - OPENAI_API_PREFIX=https://api.openai.com
    - CHATGPT_API_PREFIX=/cap
    volumes:
    - ./data:/data
    restart: unless-stopped
    depends_on:
    - go-chatgpt-api

  go-chatgpt-api:
    image: shilazi/go-chatgpt-api:23.10.12
    ports:
    - 127.0.0.1:8081:8081
    environment:
    - TZ=Asia/Shanghai
    - PORT=8081
    - CONTINUE_SIGNAL=1
    - ENABLE_HISTORY=1
    volumes:
    - ./chat.openai.com.har:/app/chat.openai.com.har
    restart: unless-stopped

default.conf

server {
    listen 80;

    location = /favicon.ico {
        return 204;
    }

    location /cap/ {
        rewrite ^/cap/(.*)$ /$1 last;
    }

    location / {
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://127.0.0.1:8080;
        proxy_set_header Host $http_host;
    }

    location ~ /api/(auth|accounts)/ {
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://127.0.0.1:8080;
        proxy_set_header Host $http_host;
    }

    location /api/ {
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://127.0.0.1:8081;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $http_host;
    }
}

Tag summary

Content type

Image

Digest

sha256:425b6a2c3…

Size

88.3 MB

Last updated

almost 3 years ago

docker pull shilazi/pandora:1.3.5