-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml.docker-backup
More file actions
108 lines (102 loc) · 2.56 KB
/
docker-compose.yml.docker-backup
File metadata and controls
108 lines (102 loc) · 2.56 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
version: '3.8'
services:
# Backend API service
api:
build: .
ports:
- "8000:8000"
environment:
- DATABASE_URL=postgresql://postgres:postgres@db:5432/pseudoscribe
- OLLAMA_BASE_URL=http://ollama:11434
- NODE_ENV=production
volumes:
- ./pseudoscribe:/app/pseudoscribe:z
depends_on:
- db
- ollama
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# VSCode Extension testing service (for development/testing)
vscode-extension:
build:
context: ./vscode-extension
dockerfile: Dockerfile
volumes:
- ./vscode-extension:/app:z
environment:
- DISPLAY=:99
- NODE_ENV=test
- PSEUDOSCRIBE_API_URL=http://api:8000
depends_on:
- api
profiles:
- test
command: /app/run-tests.sh
# Database service
db:
image: postgres:15-alpine
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=pseudoscribe
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
# Ollama AI service
ollama:
image: ollama/ollama:latest
volumes:
- ollama_data:/root/.ollama
ports:
- "11434:11434"
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:11434/api/tags"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
# Test runner service (for CI/CD and comprehensive testing)
test-runner:
build: .
environment:
- DATABASE_URL=postgresql://postgres:postgres@db:5432/pseudoscribe
- OLLAMA_BASE_URL=http://ollama:11434
- NODE_ENV=test
volumes:
- ./pseudoscribe:/app/pseudoscribe:z
- ./tests:/app/tests:z
- ./vscode-extension:/app/vscode-extension:z
depends_on:
- db
- ollama
- api
profiles:
- test
command: >
sh -c "
echo 'Waiting for services to be ready...' &&
sleep 30 &&
echo 'Running backend tests...' &&
python -m pytest tests/ -v --tb=short &&
echo 'Backend tests completed successfully' &&
echo 'Running VSCode extension tests...' &&
cd vscode-extension &&
npm test &&
echo 'All tests completed successfully'
"
volumes:
postgres_data:
ollama_data: