-
-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: v0.2.17 - promptfoo, omniparser, webtop, failed perplexideez in…
…tegration
- Loading branch information
Showing
33 changed files
with
798 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
services: | ||
omniparser: | ||
build: | ||
context: ./omniparser | ||
dockerfile: Dockerfile | ||
container_name: ${HARBOR_CONTAINER_PREFIX}.omniparser | ||
env_file: | ||
- ./.env | ||
- ./omniparser/override.env | ||
ports: | ||
- ${HARBOR_OMNIPARSER_HOST_PORT}:7861 | ||
networks: | ||
- harbor-network |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
services: | ||
# Proxy to work around the secure cookies | ||
# and cors for localhost deployment | ||
perplexideez: | ||
container_name: ${HARBOR_CONTAINER_PREFIX}.perplexideez | ||
image: nginx:alpine | ||
ports: | ||
- ${HARBOR_PERPLEXIDEEZ_HOST_PORT}:80 | ||
configs: | ||
- source: perplexideez_proxy_config | ||
target: /etc/nginx/conf.d/default.conf | ||
depends_on: | ||
perplexideez-service: | ||
condition: service_healthy | ||
networks: | ||
- harbor-network | ||
|
||
perplexideez-service: | ||
container_name: ${HARBOR_CONTAINER_PREFIX}.perplexideez-service | ||
image: ${HARBOR_PERPLEXIDEEZ_IMAGE}:${HARBOR_PERPLEXIDEEZ_VERSION} | ||
env_file: | ||
- ./.env | ||
- ./perplexideez/override.env | ||
healthcheck: | ||
# TODO: | ||
# https://github.com/brunostjohn/perplexideez/issues/12 | ||
test: ["CMD", "true"] | ||
interval: 2s | ||
timeout: 60s | ||
retries: 5 | ||
start_period: 10s | ||
depends_on: | ||
perplexideez-db: | ||
condition: service_healthy | ||
perplexideez-migrate: | ||
condition: service_completed_successfully | ||
networks: | ||
- harbor-network | ||
|
||
perplexideez-db: | ||
container_name: ${HARBOR_CONTAINER_PREFIX}.perplexideez-db | ||
image: postgres:16-alpine | ||
restart: unless-stopped | ||
volumes: | ||
- ./perplexideez/pgdata:/var/lib/postgresql/data | ||
healthcheck: | ||
test: "pg_isready -d postgres -U postgres -h localhost" | ||
interval: 2s | ||
timeout: 60s | ||
retries: 5 | ||
env_file: | ||
- ./.env | ||
- ./perplexideez/override.env | ||
environment: | ||
- POSTGRES_USER=postgres | ||
- POSTGRES_PASSWORD=postgres | ||
- POSTGRES_DB=postgres | ||
networks: | ||
- harbor-network | ||
|
||
perplexideez-migrate: | ||
container_name: ${HARBOR_CONTAINER_PREFIX}.perplexideez-migrate | ||
image: ${HARBOR_PERPLEXIDEEZ_MIGRATE_IMAGE} | ||
env_file: | ||
- ./.env | ||
- ./perplexideez/override.env | ||
depends_on: | ||
perplexideez-db: | ||
condition: service_healthy | ||
networks: | ||
- harbor-network | ||
|
||
configs: | ||
perplexideez_proxy_config: | ||
content: | | ||
server { | ||
listen 80; | ||
gzip_static off; | ||
server_name perplexideez.com; | ||
location / { | ||
proxy_pass http://perplexideez-service:3000; | ||
proxy_set_header Host perplexideez.com; | ||
proxy_set_header X-Real-IP $$remote_addr; | ||
proxy_set_header X-Forwarded-For $$proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto https; | ||
# Disable CSRF protection in Nginx | ||
proxy_set_header X-Forwarded-Host $$host; | ||
proxy_set_header Origin https://perplexideez.com; | ||
proxy_set_header Referer https://perplexideez.com; | ||
# Rewrite Location header to use localhost | ||
proxy_redirect https://perplexideez.com/ http://localhost:34261/; | ||
proxy_redirect http://perplexideez.com/ http://localhost:34261/; | ||
# Cookie rewriting | ||
proxy_cookie_domain perplexideez.com localhost; | ||
proxy_cookie_path / /; | ||
proxy_cookie_flags ~ -secure; | ||
# Force uncompressed response to allow substitutions | ||
proxy_set_header Accept-Encoding ""; | ||
# Rewrite Secure-prefixed cookies | ||
proxy_hide_header set-cookie; | ||
proxy_set_header Accept-Encoding ""; | ||
sub_filter_types *; | ||
sub_filter_once off; | ||
sub_filter '__Secure-' ''; | ||
sub_filter '; Secure' ''; | ||
sub_filter 'perplexideez.com' 'localhost:34261'; | ||
sub_filter "https://localhost:34261" "http://localhost:34261"; | ||
sub_filter "https%3A%2F%2Flocalhost%3A34261" "http%3A%2F%2Flocalhost%3A34261"; | ||
sub_filter 'href="https://localhost:34261' 'href="http://localhost:34261'; | ||
sub_filter 'content="https://localhost:34261' 'content="http://localhost:34261'; | ||
# CORS headers | ||
add_header 'Access-Control-Allow-Origin' '*'; | ||
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; | ||
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization'; | ||
# Handle OPTIONS method | ||
if ($$request_method = 'OPTIONS') { | ||
add_header 'Access-Control-Allow-Origin' '*'; | ||
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; | ||
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization'; | ||
add_header 'Access-Control-Max-Age' 1728000; | ||
add_header 'Content-Type' 'text/plain; charset=utf-8'; | ||
add_header 'Content-Length' 0; | ||
return 204; | ||
} | ||
# Force processing of response | ||
proxy_force_ranges on; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
services: | ||
promptfoo: | ||
container_name: ${HARBOR_CONTAINER_PREFIX}.promptfoo | ||
env_file: | ||
- ./.env | ||
- ./promptfoo/override.env | ||
environment: | ||
- PROMPTFOO_REMOTE_API_BASE_URL=${HARBOR_PROMPTFOO_REMOTE_API_BASE_URL} | ||
- PROMPTFOO_REMOTE_APP_BASE_URL=http://localhost:${HARBOR_PROMPTFOO_REMOTE_APP_BASE_URL} | ||
- PROMPTFOO_DISABLE_TELEMETRY=1 | ||
- PROMPTFOO_DISABLE_UPDATE=1 | ||
image: ${HARBOR_PROMPTFOO_IMAGE}:${HARBOR_PROMPTFOO_VERSION} | ||
ports: | ||
- ${HARBOR_PROMPTFOO_HOST_PORT}:3000 | ||
volumes: | ||
- ${HARBOR_PROMPTFOO_WORKSPACE}:/home/promptfoo/.promptfoo | ||
# Original healthcheck is very | ||
# slow, server starts in ~2s, so overriding | ||
healthcheck: | ||
test: [ "CMD-SHELL", "exit 0" ] | ||
interval: 2s | ||
timeout: 1s | ||
start_period: 1s | ||
retries: 5 | ||
# Avoiding issues with SIGTERM in the original | ||
command: ["ash", "-c", "node /app/dist/src/server/index.js"] | ||
networks: | ||
- harbor-network |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
services: | ||
webtop: | ||
# We add a few of extra dependencies to the image | ||
build: | ||
context: ./webtop | ||
dockerfile: Dockerfile | ||
args: | ||
HARBOR_WEBTOP_IMAGE: ${HARBOR_WEBTOP_IMAGE} | ||
HARBOR_WEBTOP_VERSION: ${HARBOR_WEBTOP_VERSION} | ||
container_name: ${HARBOR_CONTAINER_PREFIX}.webtop | ||
env_file: | ||
- ./.env | ||
- ./webtop/override.env | ||
environment: | ||
- HARBOR_HOME=/harbor | ||
- PUID=${HARBOR_USER_ID} | ||
volumes: | ||
# Mount Host's Harbor home, very important for the interop | ||
- .:/harbor | ||
# Webtop homedir, can be cleared with "harbor webtop reset" | ||
- ${HARBOR_WEBTOP_WORKSPACE}:/config | ||
# Docker access | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
# Pre-provision docker groups | ||
- ./webtop/init:/custom-cont-init.d:ro | ||
ports: | ||
- ${HARBOR_WEBTOP_HOST_PORT}:3000 | ||
# There's also HTTPS port, but we're not using it | ||
# - ${HARBOR_WEBTOP_HOST_PORT}:3001 | ||
# Avoid crashes in modern browsers | ||
shm_size: "1gb" | ||
networks: | ||
- harbor-network |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
services: | ||
perplexideez: | ||
environment: | ||
- LLM_MODE="ollama" | ||
- OLLAMA_URL=${HARBOR_OLLAMA_INTERNAL_URL} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
services: | ||
perplexideez: | ||
environment: | ||
- SEARXNG_URL=http://searxng:8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
services: | ||
promptfoo: | ||
environment: | ||
- OLLAMA_BASE_URL=${HARBOR_OLLAMA_INTERNAL_URL} | ||
- OLLAMA_API_KEY=sk-ollama |
Oops, something went wrong.