-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.local.yml
More file actions
62 lines (58 loc) · 1.55 KB
/
docker-compose.local.yml
File metadata and controls
62 lines (58 loc) · 1.55 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
# LMStack Local Development
# Use locally built Docker images
#
# Build: ./scripts/build-local.sh
# Run: docker compose -f docker-compose.local.yml up -d
services:
backend:
image: infinirc/lmstack-backend:local
container_name: lmstack-backend
user: root
ports:
- "52000:52000"
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- lmstack-data:/app/data
- /var/run/docker.sock:/var/run/docker.sock
- /tmp/lmstack-proxy:/tmp/lmstack-proxy
environment:
- LMSTACK_SECRET_KEY=${SECRET_KEY:-dev-secret-key}
- LMSTACK_EXTERNAL_URL=${EXTERNAL_URL:-}
healthcheck:
test: ["CMD", "python", "-c", "import httpx; r=httpx.get('http://127.0.0.1:52000/health'); exit(0 if r.status_code==200 else 1)"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
restart: unless-stopped
networks:
- lmstack
frontend:
image: infinirc/lmstack-frontend:local
container_name: lmstack-frontend
ports:
- "3000:80"
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
- BACKEND_HOST=backend
- NGINX_ENVSUBST_FILTER=BACKEND_HOST
depends_on:
backend:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://127.0.0.1:80/"]
interval: 10s
timeout: 5s
retries: 3
start_period: 5s
restart: unless-stopped
networks:
- lmstack
volumes:
lmstack-data:
driver: local
networks:
lmstack:
driver: bridge