-
-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
71 lines (66 loc) · 1.64 KB
/
docker-compose.yml
File metadata and controls
71 lines (66 loc) · 1.64 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
version: '3.8'
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
- DATABASE_URL=postgresql+asyncpg://postgres:${POSTGRES_PASSWORD}@db:5432/openbrowser
volumes:
# Mount for development (optional - remove for production)
- ./backend/app:/app/backend/app:ro
- ./src:/app/src:ro
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
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "3000:3000"
environment:
- NEXT_PUBLIC_API_URL=http://localhost:8000
- NEXT_PUBLIC_WS_URL=ws://localhost:8000/ws
- NEXT_PUBLIC_VNC_ENABLED=true
- NEXT_PUBLIC_AUTH_ENABLED=false
depends_on:
- backend
restart: unless-stopped
volumes:
pgdata:
networks:
default:
name: openbrowser-network