Skip to content

Commit

Permalink
Merge pull request #63 from rashadphz/pro-search
Browse files Browse the repository at this point in the history
Pro search
  • Loading branch information
rashadphz authored Jun 29, 2024
2 parents ef41fdc + 89543e6 commit 72ad211
Show file tree
Hide file tree
Showing 34 changed files with 2,067 additions and 119 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ name: Trigger auto deployment for farfalle-backend
on:
# Automatically trigger it when detected changes in repo
push:
branches:
branches:
[ main ]
paths:
- 'src/backend/**'
- '.github/workflows/farfalle-backend-AutoDeployTrigger-3e5a49cd-d51c-45b9-93a5-6170d843a4cc.yml'

# Allow manual trigger
workflow_dispatch:
# Allow manual trigger
workflow_dispatch:

jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
permissions:
id-token: write #This is required for requesting the OIDC JWT Token
contents: read #Required when GH token is used to authenticate with private repo

Expand Down
29 changes: 18 additions & 11 deletions docker-compose.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ services:
backend:
depends_on:
- postgres
- searxng
build:
context: .
dockerfile: ./src/backend/Dockerfile
Expand All @@ -16,8 +17,8 @@ services:
- OPENAI_API_KEY=${OPENAI_API_KEY}
- GROQ_API_KEY=${GROQ_API_KEY}
- ENABLE_LOCAL_MODELS=${ENABLE_LOCAL_MODELS:-True}
- SEARCH_PROVIDER=${SEARCH_PROVIDER:-tavily}
- SEARXNG_BASE_URL=${SEARXNG_BASE_URL:-http://host.docker.internal:8080}
- SEARCH_PROVIDER=${SEARCH_PROVIDER:-searxng}
- SEARXNG_BASE_URL=${SEARXNG_BASE_URL:-http://searxng:8080}
- CUSTOM_MODEL=${CUSTOM_MODEL}
- REDIS_URL=${REDIS_URL}
- DB_ENABLED=${DB_ENABLED:-True}
Expand All @@ -33,18 +34,22 @@ services:
- action: sync
path: ./src/backend
target: /workspace/src/backend
networks:
- farfalle-network
extra_hosts:
- "host.docker.internal:host-gateway"

frontend:
depends_on:
- backend
build:
context: .
dockerfile: ./src/frontend/Dockerfile
args:
- NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL:-http://localhost:8000}
- NEXT_PUBLIC_LOCAL_MODE_ENABLED=${NEXT_PUBLIC_LOCAL_MODE_ENABLED:-true}
- NEXT_PUBLIC_PRO_MODE_ENABLED=${NEXT_PUBLIC_PRO_MODE_ENABLED:-true}
restart: always
environment:
- NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL:-http://localhost:8000}
- NEXT_PUBLIC_LOCAL_MODE_ENABLED=${NEXT_PUBLIC_LOCAL_MODE_ENABLED:-true}
ports:
- "3000:3000"
develop:
Expand All @@ -54,19 +59,18 @@ services:
target: /app
ignore:
- node_modules/
networks:
- farfalle-network

searxng:
container_name: searxng
image: docker.io/searxng/searxng:latest
restart: unless-stopped
networks:
- searxng
ports:
- "8080:8080"
volumes:
- ./searxng:/etc/searxng:rw
environment:
- SEARXNG_BASE_URL=https://${SEARXNG_BASE_URL:-localhost}/
networks:
- farfalle-network

postgres:
image: postgres:15.2-alpine
Expand All @@ -79,9 +83,12 @@ services:
- "5432:5432"
volumes:
- db_volume:/var/lib/postgresql/data
networks:
- farfalle-network

networks:
searxng:
farfalle-network:
name: farfalle-network

volumes:
db_volume:
Loading

0 comments on commit 72ad211

Please sign in to comment.