-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
71 lines (59 loc) · 1.9 KB
/
docker-compose.dev.yml
File metadata and controls
71 lines (59 loc) · 1.9 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
name: bookotter
# Development Docker Compose with watch mode
# Usage: docker compose -f docker-compose.dev.yml up --watch
#
# This configuration enables hot-reload for both frontend and backend:
# - Python files sync and uvicorn auto-reloads
# - Frontend files sync and Vite HMR updates the browser
# - Dependency changes trigger a rebuild
services:
bookotter-dev:
build:
context: .
dockerfile: Dockerfile.dev
container_name: bookotter-dev
ports:
- "6887:6887" # Backend API
- "5173:5173" # Vite dev server
volumes:
# Persistent data (config, database, logs)
- ./data:/app/data
# Book library directory - adjust this path to match your setup
- /mnt/user/media/books:/books:ro
# SSH keys for Kindle access
- ~/.ssh:/root/.ssh:ro
environment:
- TZ=Europe/Oslo
- BOOKOTTER_DATA_DIR=/app/data
- VITE_API_URL=http://localhost:6887
develop:
watch:
# Backend Python files - sync and let uvicorn --reload handle it
- action: sync
path: ./backend
target: /app/backend
ignore:
- __pycache__/
- "*.pyc"
# Frontend source - sync for Vite HMR
- action: sync
path: ./frontend/src
target: /app/frontend/src
ignore:
- "*.test.*"
- action: sync
path: ./frontend/index.html
target: /app/frontend/index.html
- action: sync
path: ./frontend/tailwind.config.js
target: /app/frontend/tailwind.config.js
- action: sync
path: ./frontend/vite.config.ts
target: /app/frontend/vite.config.ts
# Dependency changes require rebuild
- action: rebuild
path: ./requirements.txt
- action: rebuild
path: ./frontend/package.json
- action: rebuild
path: ./frontend/pnpm-lock.yaml