Skip to content
Open
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
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
# See the documentation for all the connection string options: https://pris.ly/d/connection-strings

DATABASE_URL="postgresql://watches:watches@localhost:5432/watches?schema=public"
EMBEDDING_MODEL=all-minilm
40 changes: 30 additions & 10 deletions .upsun/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,45 @@ services:
- vector

applications:
ollama:
stack:
- "python@3.12"
- "ollama"
container_profile: BALANCED
relationships:
db: "postgresql:postgresql"
mounts:
"/.ollama":
source: "storage"
source_path: ".ollama"
web:
commands:
start: "OLLAMA_HOST=:$PORT ollama serve"
hooks:
build: |
set -eux
cd vectorize/
pip install -r requirements.txt
deploy: |
set -eux
set -a
. /app/.env
export OLLAMA_HOST=:$PORT
ollama pull $EMBEDDING_MODEL

cd vectorize/
python vectorize.py

app:
stack:
- "nodejs@22"
- "python@3.12"
relationships:
db: "postgresql:postgresql"
ollama: "ollama:http"
mounts:
"/.npm":
source: "storage"
source_path: "npm"
"/.cache":
source: "storage"
source_path: "cache"
web:
commands:
start: "npx next start -p $PORT"
Expand All @@ -28,12 +54,6 @@ applications:
npm install
npx prisma generate
npm run build
cd vectorize/
pip install -r requirements.txt
post_deploy: |
set -eux
cd vectorize/
python vectorize.py

routes:
"https://{default}/":
Expand Down
Loading