-
Notifications
You must be signed in to change notification settings - Fork 859
/
docker-compose.yml
57 lines (56 loc) · 1.38 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
version: "3"
services:
postgres:
image: pgvector/pgvector:pg16
healthcheck:
test: pg_isready -U $POSTGRES_USER
start_interval: 1s
start_period: 5s
interval: 5s
retries: 5
ports:
- "5433:5432"
env_file:
- .env
volumes:
- ./postgres-volume:/var/lib/postgresql/data
postgres-setup:
image: migrate/migrate
depends_on:
postgres:
condition: service_healthy
volumes:
- ./backend/migrations:/migrations
env_file:
- .env
command: ["-path", "/migrations", "-database", "postgres://$POSTGRES_USER:$POSTGRES_PASSWORD@postgres:$POSTGRES_PORT/$POSTGRES_DB?sslmode=disable", "up"]
backend:
container_name: opengpts-backend
build:
context: backend
ports:
- "8100:8000" # Backend is accessible on localhost:8100
depends_on:
postgres-setup:
condition: service_completed_successfully
env_file:
- .env
volumes:
- ./backend:/backend
environment:
POSTGRES_HOST: "postgres"
command:
- --reload
frontend:
container_name: opengpts-frontend
build:
context: frontend
depends_on:
backend:
condition: service_healthy
volumes:
- ./frontend/src:/frontend/src
ports:
- "5173:5173" # Frontend is accessible on localhost:5173
environment:
VITE_BACKEND_URL: "http://backend:8000"