-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
93 lines (88 loc) · 2.47 KB
/
Copy pathdocker-compose.yml
File metadata and controls
93 lines (88 loc) · 2.47 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
services:
postgres:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_DB: steam_rec
POSTGRES_USER: steam_rec
POSTGRES_PASSWORD: steam_rec
ports:
- "127.0.0.1:5433:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U steam_rec -d steam_rec"]
interval: 5s
timeout: 5s
retries: 20
postgres_loader:
profiles: ["loader"]
build:
context: .
dockerfile: Dockerfile.api
depends_on:
postgres:
condition: service_healthy
environment:
STEAM_REC_POSTGRES_DSN: postgresql://steam_rec:steam_rec@postgres:5432/steam_rec
DB_CREATION_DATA_DIR: /app/data
volumes:
- ./data:/app/data:ro
command: ["python", "-m", "db_creation.postgres.load_from_sqlite"]
restart: "no"
api:
build:
context: .
dockerfile: Dockerfile.api
depends_on:
postgres:
condition: service_healthy
environment:
STEAM_REC_POSTGRES_DSN: postgresql://steam_rec:steam_rec@postgres:5432/steam_rec
DB_CREATION_DATA_DIR: /app/data
volumes:
- ./data:/app/data
- chroma_model_cache:/root/.cache/chroma
ports:
- "127.0.0.1:8000:8000"
restart: unless-stopped
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
NEXT_PUBLIC_API_BASE_URL: ${NEXT_PUBLIC_API_BASE_URL:-http://localhost:8000}
NEXT_PUBLIC_POSTHOG_TOKEN: ${NEXT_PUBLIC_POSTHOG_TOKEN:-}
NEXT_PUBLIC_POSTHOG_HOST: ${NEXT_PUBLIC_POSTHOG_HOST:-}
depends_on:
api:
condition: service_started
ports:
- "127.0.0.1:3000:3000"
restart: unless-stopped
dev:
profiles: ["dev"]
build:
context: ./frontend
dockerfile: Dockerfile.dev
command: ["npm", "run", "dev", "--", "--hostname", "0.0.0.0", "--port", "3000"]
depends_on:
api:
condition: service_started
environment:
NODE_ENV: development
NEXT_PUBLIC_API_BASE_URL: ${NEXT_PUBLIC_API_BASE_URL:-http://localhost:8000}
NEXT_PUBLIC_POSTHOG_TOKEN: ${NEXT_PUBLIC_POSTHOG_TOKEN:-}
NEXT_PUBLIC_POSTHOG_HOST: ${NEXT_PUBLIC_POSTHOG_HOST:-}
WATCHPACK_POLLING: "true"
volumes:
- ./frontend:/app
- frontend_node_modules:/app/node_modules
- frontend_next:/app/.next
ports:
- "127.0.0.1:3000:3000"
volumes:
postgres_data:
chroma_model_cache:
frontend_node_modules:
frontend_next: