-
-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
56 lines (52 loc) · 1.41 KB
/
docker-compose.dev.yml
File metadata and controls
56 lines (52 loc) · 1.41 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
version: '3.8'
# Development compose: backend with VNC + PostgreSQL for chat persistence.
# Frontend runs locally with `cd frontend && npm run dev`.
services:
db:
image: postgres:16-alpine
ports:
- "5432:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: openbrowser
volumes:
- pgdata:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 3s
retries: 5
backend:
build:
context: .
dockerfile: backend/Dockerfile
ports:
- "8000:8000" # FastAPI backend
- "6080-6090:6080-6090" # VNC websockify ports
env_file:
- ./backend/.env
environment:
- VNC_ENABLED=true
- VNC_WIDTH=1920
- VNC_HEIGHT=1080
- DEBUG=true
- AUTH_ENABLED=false
- CORS_ORIGINS=["http://localhost:3000","http://127.0.0.1:3000"]
- DATABASE_URL=postgresql+asyncpg://postgres:${POSTGRES_PASSWORD}@db:5432/openbrowser
volumes:
# Mount for hot-reload during development
- ./backend/app:/app/backend/app
- ./src:/app/src
depends_on:
db:
condition: service_healthy
restart: unless-stopped
# Required for Xvfb to work properly
shm_size: '2gb'
# Security context for X11
security_opt:
- seccomp:unconfined
volumes:
pgdata: