-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
108 lines (108 loc) · 2.68 KB
/
docker-compose.dev.yml
File metadata and controls
108 lines (108 loc) · 2.68 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
services:
redis:
image: redis:7-alpine
ports:
- "6379:6379"
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 5s
timeout: 3s
retries: 10
db:
image: postgres:16
restart: always
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USER}
ports:
- "${DB_PORT:-5432}:5432"
volumes:
- db_data:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U ${DB_USER}" ]
interval: 60s
timeout: 5s
retries: 5
start_period: 10s
worker:
build:
context: ./backend
command: >
watchmedo auto-restart --directory=./ --pattern=*.py --recursive -- python3 -Xfrozen_modules=off -m celery -A worker.tasks worker
environment:
CELERY_BACKEND_URL: ${CELERY_BACKEND_URL}
CELERY_BROKER_URL: ${CELERY_BROKER_URL}
DB_HOST: ${DB_HOST}
DB_NAME: ${DB_NAME}
DB_PORT: ${DB_PORT}
DB_PASSWORD: ${DB_PASSWORD}
DB_USER: ${DB_USER}
OPENAI_API_KEY: ${OPENAI_API_KEY}
depends_on:
redis:
condition: service_healthy
db:
condition: service_healthy
volumes:
- ./backend/src:/app/src
backend:
build:
context: ./backend
ports:
- "8000:8000"
- "5678:5678" # debugpy
volumes:
- ./backend/src:/app/src
command: >
python3 -Xfrozen_modules=off -m uvicorn main:app --host 0.0.0.0 --port 8000 --reload
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8000/docs" ]
interval: 60s
timeout: 5s
retries: 5
start_period: 10s
environment:
CELERY_BACKEND_URL: ${CELERY_BACKEND_URL}
CELERY_BROKER_URL: ${CELERY_BROKER_URL}
DB_HOST: ${DB_HOST}
DB_NAME: ${DB_NAME}
DB_PORT: ${DB_PORT}
DB_PASSWORD: ${DB_PASSWORD}
DB_USER: ${DB_USER}
DEBUGPY: "1"
DEBUGPY_PORT: "5678"
LINKEDIN_CLIENT_ID: ${LINKEDIN_CLIENT_ID}
LINKEDIN_CLIENT_SECRET: ${LINKEDIN_CLIENT_SECRET}
OPENAI_API_KEY: ${OPENAI_API_KEY}
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
scheduler:
build:
context: ./backend/scheduler
depends_on:
backend:
condition: service_healthy
volumes:
- ./backend/scheduler:/app
command: go run scheduler.go
frontend:
build:
context: ./frontend
ports:
- "3000:3000"
volumes:
- ./frontend:/app:delegated
- /app/node_modules
- /app/.next
depends_on:
backend:
condition: service_healthy
environment:
NODE_ENV: development
command: pnpm run dev
volumes:
db_data: