-
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 (100 loc) · 3.34 KB
/
docker-compose.dev.yml
File metadata and controls
108 lines (100 loc) · 3.34 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:
postgres:
ports:
- "5432:5432"
redis:
ports:
- "6379:6379"
mailpit:
ports:
- "1085:1025"
- "8085:8025"
ollama:
ports:
- "11434:11434"
db-migrate:
image: node:24-alpine
container_name: haive-db-migrate
depends_on:
postgres:
condition: service_healthy
working_dir: /app
volumes:
- .:/app
environment:
DATABASE_URL: postgres://${POSTGRES_USER:-haive}:${POSTGRES_PASSWORD:-haive_dev_password}@postgres:5432/${POSTGRES_DB:-haive}
command: >
sh -c "corepack enable &&
pnpm install --frozen-lockfile=false &&
pnpm --filter @haive/database push --force"
networks:
- haive-network
restart: "no"
api:
build:
target: deps
ports:
- "3001:3001"
volumes:
- .:/app
- haive_node_modules_root:/app/node_modules
- haive_node_modules_api:/app/packages/api/node_modules
- haive_node_modules_shared:/app/packages/shared/node_modules
- haive_node_modules_database:/app/packages/database/node_modules
- ${HOST_REPO_ROOT:-${HOME}}:/host-fs:ro
- haive_repos:/var/lib/haive/repos
- haive_bundles:/var/lib/haive/bundles
- ${DOCKER_SOCKET:-/var/run/docker.sock}:/var/run/docker.sock
command: sh -c "pnpm --filter @haive/database build && pnpm --filter @haive/shared build && pnpm --filter @haive/api dev"
environment:
NODE_ENV: development
HOST_REPO_ROOT: /host-fs
REPO_STORAGE_ROOT: /var/lib/haive/repos
BUNDLE_STORAGE_ROOT: /var/lib/haive/bundles
DOCKER_HOST: unix:///var/run/docker.sock
worker:
build:
target: deps
volumes:
- .:/app
- haive_node_modules_root:/app/node_modules
- haive_node_modules_worker:/app/packages/worker/node_modules
- haive_node_modules_shared:/app/packages/shared/node_modules
- haive_node_modules_database:/app/packages/database/node_modules
- ${DOCKER_SOCKET:-/var/run/docker.sock}:/var/run/docker.sock
- ${HOST_REPO_ROOT:-${HOME}}:/host-fs
- haive_repos:/var/lib/haive/repos
- haive_bundles:/var/lib/haive/bundles
- haive_wrappers:/var/lib/haive/wrappers
- haive_squid_configs:/var/lib/haive/squid-configs
command: sh -c "pnpm --filter @haive/database build && pnpm --filter @haive/shared build && pnpm --filter @haive/worker dev"
environment:
NODE_ENV: development
HOST_REPO_ROOT: /host-fs
HOST_REPO_ROOT_REAL: ${HOST_REPO_ROOT:-${HOME}}
HOST_USER_HOME: ${HOME}
BUNDLE_STORAGE_ROOT: /var/lib/haive/bundles
SANDBOX_IMAGE: ${SANDBOX_IMAGE:-haive-cli-sandbox:latest}
SANDBOX_WRAPPER_HOST_VOLUME: ${SANDBOX_WRAPPER_HOST_VOLUME:-haive_wrappers}
web:
build:
target: deps
ports:
- "3000:3000"
volumes:
- .:/app
- haive_node_modules_root:/app/node_modules
- haive_node_modules_web:/app/packages/web/node_modules
- haive_node_modules_shared:/app/packages/shared/node_modules
- haive_web_next:/app/packages/web/.next
command: sh -c "pnpm --filter @haive/shared build && pnpm --filter @haive/web dev"
environment:
NODE_ENV: development
volumes:
haive_node_modules_root:
haive_node_modules_shared:
haive_node_modules_database:
haive_node_modules_api:
haive_node_modules_worker:
haive_node_modules_web:
haive_web_next: