Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(refacto): changed a bit of things to make better dx #984

Merged
merged 1 commit into from
Aug 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/aws-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [ "main" ]
paths:
- 'backend/core/**'
- 'backend/**'

env:
AWS_REGION: eu-west-3
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
IMAGE_TAG: ${{ github.sha }}
with:
context: ./backend/core/
context: ./backend/
push: true
tags: ${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }}, ${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:latest, ghcr.io/stangirard/quivr:latest
cache-from: type=gha
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
IMAGE_TAG: ${{ github.sha }}
with:
context: ./backend/core/
context: ./backend/
push: true
tags: ${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }}, ${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ github.ref_name}}, ghcr.io/stangirard/quivr:${{ github.ref_name}}
cache-from: type=gha
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/backend-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ on:
push:
branches: [main]
paths:
- 'backend/core/**'
- 'backend/**'
pull_request:
branches: [main]
paths:
- 'backend/core/**'
- 'backend/**'
workflow_dispatch:
inputs:
logLevel:
Expand All @@ -34,7 +34,7 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./backend/core
working-directory: ./backend
environment: preview
strategy:
matrix:
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,21 +95,21 @@ Additionally, you'll need a [Supabase](https://supabase.com/) account for:
- **Step 2 - Bis**: Copy the `.XXXXX_env` files

```bash
cp .backend_env.example backend/core/.env
cp .backend_env.example backend/.env
cp .frontend_env.example frontend/.env
```

- **Step 3**: Update the `backend/core/.env` and `frontend/.env` file
- **Step 3**: Update the `backend/.env` and `frontend/.env` file

> _Your `supabase_service_key` can be found in your Supabase dashboard under Project Settings -> API. Use the `anon` `public` key found in the `Project API keys` section._

> _Your `JWT_SECRET_KEY`can be found in your supabase settings under Project Settings -> API -> JWT Settings -> JWT Secret_

> _The `NEXT_PUBLIC_BACKEND_URL` is set to localhost:5050 for the docker. Update it if you are running the backend on a different machine._

> _To activate vertexAI with PaLM from GCP follow the instructions [here](https://python.langchain.com/en/latest/modules/models/llms/integrations/google_vertex_ai_palm.html) and update `backend/core/.env`- It is an advanced feature, please be expert in GCP before trying to use it_
> _To activate vertexAI with PaLM from GCP follow the instructions [here](https://python.langchain.com/en/latest/modules/models/llms/integrations/google_vertex_ai_palm.html) and update `backend/.env`- It is an advanced feature, please be expert in GCP before trying to use it_

- [ ] Change variables in `backend/core/.env`
- [ ] Change variables in `backend/.env`
- [ ] Change variables in `frontend/.env`

- **Step 4**: Use the `migration.sh` script to run the migration scripts
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added backend/pandoc-3.1.6.1-1-arm64.deb
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
20 changes: 0 additions & 20 deletions backend/private/Dockerfile

This file was deleted.

17 changes: 0 additions & 17 deletions backend/private/logger.py

This file was deleted.

30 changes: 0 additions & 30 deletions backend/private/main.py

This file was deleted.

18 changes: 0 additions & 18 deletions backend/private/models/messages.py

This file was deleted.

11 changes: 0 additions & 11 deletions backend/private/requirements.txt

This file was deleted.

18 changes: 0 additions & 18 deletions backend/private/routes/completions_routes.py

This file was deleted.

16 changes: 0 additions & 16 deletions backend/private/routes/embeddings_routes.py

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Instructions:
1. in .backend/core/supabase folder, create .env file with BEEHIIV_PUBLICATION_ID and BEEHIIV_API_KEY variables
1. in .backend/supabase folder, create .env file with BEEHIIV_PUBLICATION_ID and BEEHIIV_API_KEY variables
2. cd into .backend
--- for the rest of these steps you will need your supabase project id which can be found in your console url: https://supabase.com/dashboard/project/<projectId> ---
3. run `supabase secrets set --env-file ./supabase/.env` to set the environment variables
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
24 changes: 12 additions & 12 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ services:

backend-core:
env_file:
- ./backend/core/.env
- ./backend/.env
build:
context: backend/core
context: backend
dockerfile: Dockerfile
container_name: backend-core
command: uvicorn main:app --host 0.0.0.0 --port 5050
restart: always
volumes:
- ./backend/core/:/code/
- ./backend/:/code/
labels:
- "traefik.enable=true"
- "traefik.http.routers.backend-core.rule=PathPrefix(`/`)"
Expand All @@ -44,15 +44,15 @@ services:

backend-chat:
env_file:
- ./backend/core/.env
- ./backend/.env
build:
context: backend/core
context: backend
dockerfile: Dockerfile
container_name: backend-chat
command: uvicorn chat_service:app --host 0.0.0.0 --port 5050
restart: always
volumes:
- ./backend/core/:/code/
- ./backend/:/code/
labels:
- "traefik.enable=true"
- "traefik.http.routers.backend-chat.rule=PathPrefix(`/chat`)"
Expand All @@ -61,15 +61,15 @@ services:

backend-crawl:
env_file:
- ./backend/core/.env
- ./backend/.env
build:
context: backend/core
context: backend
dockerfile: Dockerfile
container_name: backend-crawl
command: uvicorn crawl_service:app --host 0.0.0.0 --port 5050
restart: always
volumes:
- ./backend/core/:/code/
- ./backend/:/code/
labels:
- "traefik.enable=true"
- "traefik.http.routers.backend-crawl.rule=PathPrefix(`/crawl`)"
Expand All @@ -78,15 +78,15 @@ services:

backend-upload:
env_file:
- ./backend/core/.env
- ./backend/.env
build:
context: backend/core
context: backend
dockerfile: Dockerfile
container_name: backend-upload
command: uvicorn upload_service:app --host 0.0.0.0 --port 5050
restart: always
volumes:
- ./backend/core/:/code/
- ./backend/:/code/
labels:
- "traefik.enable=true"
- "traefik.http.routers.backend-upload.rule=PathPrefix(`/upload`)"
Expand Down
42 changes: 0 additions & 42 deletions docker-compose.private-dev.yml

This file was deleted.

Loading
Loading