-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
71 lines (65 loc) · 1.71 KB
/
docker-compose.yml
File metadata and controls
71 lines (65 loc) · 1.71 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
# LMStack Docker Compose Configuration
# Usage: docker compose up -d
version: '3.8'
services:
# PostgreSQL Database
db:
image: postgres:15-alpine
container_name: lmstack-db
environment:
POSTGRES_USER: ${POSTGRES_USER:-lmstack}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-lmstack}
POSTGRES_DB: ${POSTGRES_DB:-lmstack}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-lmstack}"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
networks:
- lmstack
# Backend API Server
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: lmstack-backend
environment:
LMSTACK_DATABASE_URL: postgresql+asyncpg://${POSTGRES_USER:-lmstack}:${POSTGRES_PASSWORD:-lmstack}@db:5432/${POSTGRES_DB:-lmstack}
LMSTACK_SECRET_KEY: ${SECRET_KEY:-change-me-in-production}
LMSTACK_DEBUG: ${DEBUG:-false}
LMSTACK_CORS_ORIGINS: ${CORS_ORIGINS:-*}
ports:
- "${BACKEND_PORT:-52000}:52000"
volumes:
# Mount docker socket for local worker management
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
db:
condition: service_healthy
restart: unless-stopped
networks:
- lmstack
# Frontend Web UI
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
args:
VITE_API_URL: ${VITE_API_URL:-/api}
container_name: lmstack-frontend
ports:
- "${FRONTEND_PORT:-80}:80"
depends_on:
- backend
restart: unless-stopped
networks:
- lmstack
volumes:
postgres_data:
driver: local
networks:
lmstack:
driver: bridge