-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
123 lines (117 loc) · 3.26 KB
/
docker-compose.dev.yml
File metadata and controls
123 lines (117 loc) · 3.26 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: orchestra-dev
networks:
storage:
external: true
services:
external: true
x-backend-common: &backend-common
build:
context: ./backend
dockerfile: Dockerfile.dev
working_dir: /app
init: true
env_file:
- ~/.env/orchestra/.env.backend
environment:
APP_ENV: development
APP_LOG_LEVEL: DEBUG
POSTGRES_CONNECTION_STRING: "postgresql://admin:test1234@postgres:5432/lg_template_dev"
REDIS_URL: redis://redis:6379/0
SEARX_SEARCH_HOST_URL: http://search_engine:8080
DISTRIBUTED_WORKERS: "true"
volumes:
- ./backend:/app
- backend_venv:/app/.venv
- backend_uv_cache:/root/.cache/uv
extra_hosts:
- host.docker.internal:host-gateway
networks:
- default
- storage
- services
services:
backend:
<<: *backend-common
ports:
- "8000:8000"
command:
[
"/bin/sh",
"-lc",
"uv sync --frozen --dev --extra api --no-install-project && uv run alembic upgrade head && uv run uvicorn main:app --reload --host 0.0.0.0 --port 8000 --log-level debug",
]
healthcheck:
test:
[
"CMD",
"python",
"-c",
"import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/info/health', timeout=5).read()",
]
interval: 15s
timeout: 5s
retries: 10
start_period: 45s
deploy:
resources:
limits:
cpus: "2"
memory: 2G
worker:
<<: *backend-common
command:
[
"/bin/sh",
"-lc",
"uv sync --frozen --dev --extra api --no-install-project && uv run taskiq worker src.workers.tasks:broker",
]
depends_on:
backend:
condition: service_healthy
healthcheck:
test: ["CMD", "pgrep", "-f", "taskiq"]
interval: 15s
timeout: 5s
retries: 10
start_period: 30s
deploy:
resources:
limits:
cpus: "2"
memory: 2G
frontend:
build:
context: ./frontend
dockerfile: Dockerfile.dev
working_dir: /app
init: true
ports:
- "5173:5173"
environment:
VITE_PROXY_TARGET: http://backend:8000
CHOKIDAR_USEPOLLING: "true"
WATCHPACK_POLLING: "true"
volumes:
- ./frontend:/app
- frontend_node_modules:/app/node_modules
user: "0:0"
command:
[
"/bin/sh",
"-c",
"npm install && npm run dev -- --host 0.0.0.0 --port 5173",
]
depends_on:
backend:
condition: service_healthy
networks:
- default
deploy:
resources:
limits:
cpus: "1"
memory: 1G
volumes:
backend_uv_cache:
backend_venv:
frontend_node_modules: