anky2002 commited on
Commit
ba457a1
·
verified ·
1 Parent(s): 71a7801

fix: Use pgvector Docker image + update docker-compose for full functionality

Browse files
Files changed (1) hide show
  1. docker-compose.yml +13 -3
docker-compose.yml CHANGED
@@ -1,6 +1,7 @@
 
 
1
  services:
2
  db:
3
- # pgvector-enabled PostgreSQL image; required by the initial migration.
4
  image: pgvector/pgvector:pg17
5
  restart: unless-stopped
6
  environment:
@@ -8,11 +9,11 @@ services:
8
  POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-jobportal}
9
  POSTGRES_DB: ${POSTGRES_DB:-jobportal}
10
  ports:
11
- - "${POSTGRES_PORT:-55432}:5432"
12
  volumes:
13
  - postgres_data:/var/lib/postgresql/data
14
  healthcheck:
15
- test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-jobportal} -d ${POSTGRES_DB:-jobportal}"]
16
  interval: 5s
17
  timeout: 5s
18
  retries: 5
@@ -35,6 +36,9 @@ services:
35
  restart: unless-stopped
36
  env_file:
37
  - .env
 
 
 
38
  ports:
39
  - "8000:8000"
40
  depends_on:
@@ -53,6 +57,9 @@ services:
53
  restart: unless-stopped
54
  env_file:
55
  - .env
 
 
 
56
  depends_on:
57
  db:
58
  condition: service_healthy
@@ -69,6 +76,9 @@ services:
69
  restart: unless-stopped
70
  env_file:
71
  - .env
 
 
 
72
  depends_on:
73
  db:
74
  condition: service_healthy
 
1
+ version: "3.8"
2
+
3
  services:
4
  db:
 
5
  image: pgvector/pgvector:pg17
6
  restart: unless-stopped
7
  environment:
 
9
  POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-jobportal}
10
  POSTGRES_DB: ${POSTGRES_DB:-jobportal}
11
  ports:
12
+ - "5432:5432"
13
  volumes:
14
  - postgres_data:/var/lib/postgresql/data
15
  healthcheck:
16
+ test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-jobportal}"]
17
  interval: 5s
18
  timeout: 5s
19
  retries: 5
 
36
  restart: unless-stopped
37
  env_file:
38
  - .env
39
+ environment:
40
+ - POSTGRES_SERVER=db
41
+ - REDIS_URL=redis://redis:6379/0
42
  ports:
43
  - "8000:8000"
44
  depends_on:
 
57
  restart: unless-stopped
58
  env_file:
59
  - .env
60
+ environment:
61
+ - POSTGRES_SERVER=db
62
+ - REDIS_URL=redis://redis:6379/0
63
  depends_on:
64
  db:
65
  condition: service_healthy
 
76
  restart: unless-stopped
77
  env_file:
78
  - .env
79
+ environment:
80
+ - POSTGRES_SERVER=db
81
+ - REDIS_URL=redis://redis:6379/0
82
  depends_on:
83
  db:
84
  condition: service_healthy