Skip to content

Commit 4fe13ae

Browse files
committed
Add Pinecone Local Docker container for local development
- Add pinecone-local Docker image to compose.yaml - Configure PINECONE_HOST to point to local container - Enable Pinecone store in examples/commands/stores.php
1 parent a1f71c3 commit 4fe13ae

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

examples/.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ MAPBOX_ACCESS_TOKEN=
8080
MONGODB_URI=mongodb://symfony:symfony@127.0.0.1:27017
8181

8282
# For using Pinecone (store)
83-
PINECONE_API_KEY=1234
84-
PINECONE_HOST=
83+
PINECONE_API_KEY=pclocal
84+
PINECONE_HOST=http://127.0.0.1:5080
8585

8686
# For using Postgres (store)
8787
POSTGRES_URI=pdo-pgsql://postgres:postgres@127.0.1:5432/my_database

examples/commands/stores.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@
101101
// env('OPENSEARCH_ENDPOINT'),
102102
// 'symfony',
103103
// ),
104-
// 'pinecone' => static fn (): PineconeStore => new PineconeStore(
105-
// new PineconeClient(env('PINECONE_API_KEY'), env('PINECONE_HOST')),
106-
// 'symfony',
107-
// ),
104+
'pinecone' => static fn (): PineconeStore => new PineconeStore(
105+
new PineconeClient(env('PINECONE_API_KEY'), env('PINECONE_HOST')),
106+
'symfony',
107+
),
108108
'postgres' => static fn (): PostgresStore => PostgresStore::fromDbal(
109109
DriverManager::getConnection((new DsnParser())->parse(env('POSTGRES_URI'))),
110110
'my_table',

examples/compose.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,15 @@ services:
146146
ports:
147147
- '9201:9200'
148148

149+
pinecone:
150+
image: ghcr.io/pinecone-io/pinecone-local:latest
151+
platform: linux/amd64
152+
environment:
153+
PORT: 5080
154+
PINECONE_HOST: localhost
155+
ports:
156+
- '5080-5090:5080-5090'
157+
149158
opensearch:
150159
image: opensearchproject/opensearch
151160
environment:

0 commit comments

Comments
 (0)