Skip to content

Commit 51ea32e

Browse files
authored
Add docker-compose file (#5)
Add docker compose file
1 parent 5dee605 commit 51ea32e

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

docker-compose.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Use to test langchain-postgres
2+
version: "3"
3+
name: langchain-postgres
4+
5+
services:
6+
postgres:
7+
image: postgres:16
8+
environment:
9+
POSTGRES_DB: langchain
10+
POSTGRES_USER: langchain
11+
POSTGRES_PASSWORD: langchain
12+
ports:
13+
- "6023:5432"
14+
command: |
15+
postgres -c log_statement=all
16+
healthcheck:
17+
test:
18+
[
19+
"CMD-SHELL",
20+
"psql postgresql://langchain:langchain@localhost/langchain --command 'SELECT 1;' || exit 1",
21+
]
22+
interval: 5s
23+
retries: 60
24+
volumes:
25+
- postgres_data:/var/lib/postgresql/data
26+
pgvector:
27+
# postgres with the pgvector extension
28+
image: ankane/pgvector
29+
environment:
30+
POSTGRES_DB: langchain
31+
POSTGRES_USER: langchain
32+
POSTGRES_PASSWORD: langchain
33+
ports:
34+
- "6024:5432"
35+
command: |
36+
postgres -c log_statement=all
37+
healthcheck:
38+
test:
39+
[
40+
"CMD-SHELL",
41+
"psql postgresql://langchain:langchain@localhost/langchain --command 'SELECT 1;' || exit 1",
42+
]
43+
interval: 5s
44+
retries: 60
45+
volumes:
46+
- postgres_data_pgvector:/var/lib/postgresql/data
47+
48+
volumes:
49+
postgres_data:
50+
postgres_data_pgvector:

0 commit comments

Comments
 (0)