-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
144 lines (114 loc) · 3.16 KB
/
docker-compose.dev.yml
File metadata and controls
144 lines (114 loc) · 3.16 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# Docker Compose configuration for GitForAI Development
# Development environment with hot-reload and testing capabilities
version: '3.8'
services:
# Main development container
dev:
build:
context: .
target: development
image: gitforai:dev
container_name: gitforai-dev
# Mount source code for live editing
volumes:
- .:/app # Mount entire project directory
- ./repos:/repos:ro # Repositories to analyze
- ./output:/output # Output directory
- gitforai-dev-cache:/cache # Cache directory
- gitforai-venv:/opt/venv # Persist virtual environment
- gitforai-dev-state:/home/gitforai/.gitforai # State directory for incremental updates
# Environment variables
environment:
- LOG_LEVEL=DEBUG
- PYTHONUNBUFFERED=1
- PYTHONDONTWRITEBYTECODE=1
# Add your API keys for testing (or use .env file)
- OPENAI_API_KEY=${OPENAI_API_KEY}
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
# Keep container running
stdin_open: true
tty: true
# Override command for interactive shell
command: /bin/bash
# Working directory
working_dir: /app
# Network
networks:
- gitforai-dev-network
# Test runner service
test:
build:
context: .
target: development
image: gitforai:dev
container_name: gitforai-test
volumes:
- .:/app
- gitforai-test-cache:/cache
environment:
- LOG_LEVEL=DEBUG
- PYTHONUNBUFFERED=1
# Run tests
command: pytest tests/ -v --cov=src/gitforai --cov-report=html --cov-report=term
working_dir: /app
networks:
- gitforai-dev-network
# Don't restart on failure
restart: "no"
# Code formatter/linter service
lint:
build:
context: .
target: development
image: gitforai:dev
container_name: gitforai-lint
volumes:
- .:/app
# Run linters and formatters
command: >
sh -c "
echo '=== Running Black ===' &&
black --check src/ tests/ &&
echo '=== Running Ruff ===' &&
ruff check src/ tests/ &&
echo '=== Running MyPy ===' &&
mypy src/
"
working_dir: /app
networks:
- gitforai-dev-network
restart: "no"
# Interactive Python shell with gitforai loaded
shell:
build:
context: .
target: development
image: gitforai:dev
container_name: gitforai-shell
volumes:
- .:/app
- ./repos:/repos:ro
- gitforai-dev-cache:/cache
- gitforai-dev-state:/home/gitforai/.gitforai
environment:
- PYTHONUNBUFFERED=1
- OPENAI_API_KEY=${OPENAI_API_KEY}
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
stdin_open: true
tty: true
command: python -i -c "from gitforai.extraction import GitExtractor; from gitforai.models import *; from gitforai.llm import *; print('GitForAI development shell loaded with LLM support')"
working_dir: /app
networks:
- gitforai-dev-network
volumes:
gitforai-dev-cache:
driver: local
gitforai-test-cache:
driver: local
gitforai-venv:
driver: local
gitforai-dev-state:
driver: local
networks:
gitforai-dev-network:
driver: bridge