-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
89 lines (83 loc) · 2.46 KB
/
docker-compose.yml
File metadata and controls
89 lines (83 loc) · 2.46 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
# NOTE: This file is NOT currently used.
# The project uses docker-compose.services.yml instead (via start-services.sh)
# This file is kept for reference but may contain outdated configuration.
#
# Current setup:
# - Backend services run in Docker (via docker-compose.services.yml)
# - Frontend runs locally (not in Docker)
# - Use ./scripts/dev/start-services.sh to start backend services
services:
backend:
build:
context: ./backend
ports:
- '3000:3000'
volumes:
- ./backend:/app # Mount the code directory
- /app/node_modules # Exclude node_modules from the host
- repo_volume:/data/repos
command: sh -c "npx prisma generate && npx prisma migrate deploy && npm run dev"
environment:
- NODE_ENV=development
- REDIS_HOST=redis
- REDIS_PORT=6379
# GitHub OAuth Configuration
- GITHUB_CLIENT_ID=${GITHUB_CLIENT_ID}
- GITHUB_CLIENT_SECRET=${GITHUB_CLIENT_SECRET}
- FRONTEND_URL=${FRONTEND_URL:-http://localhost:4000}
- BACKEND_URL=${BACKEND_URL:-http://localhost:3000}
- SESSION_SECRET=${SESSION_SECRET}
- GITHUB_TOKEN=${GITHUB_TOKEN:-}
# Database Configuration
- DATABASE_URL=postgresql://user:password@db:5432/github_scraper
depends_on:
- db
- redis
restart: always
frontend:
build:
context: ./frontend
ports:
- '4000:3000'
volumes:
- ./frontend:/app # Mount frontend code
- /app/node_modules # Exclude node_modules from host
command: npm run dev
environment:
- NODE_ENV=development
- NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL:-http://localhost:3000}
depends_on:
- backend
db:
image: postgres:15 # Specify an exact version of PostgreSQL
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: github_scraper
volumes:
- pg_data:/var/lib/postgresql/data
redis:
image: redis:6-alpine
ports:
- '6379:6379'
worker:
build:
context: ./backend
volumes:
- ./backend:/app
- /app/node_modules
- repo_volume:/data/repos
command: sh -c "npx prisma generate && npx prisma migrate deploy && npm run dev:worker"
environment:
- NODE_ENV=development
- REDIS_HOST=redis
- REDIS_PORT=6379
# Database Configuration
- DATABASE_URL=postgresql://user:password@db:5432/github_scraper
depends_on:
- backend
- redis
restart: always
volumes:
repo_volume:
pg_data: