-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
112 lines (105 loc) · 2.55 KB
/
Copy pathdocker-compose.yml
File metadata and controls
112 lines (105 loc) · 2.55 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
version: '3.8'
services:
# PostgreSQL Database
db:
image: postgres:15-alpine
container_name: testplatform-db
environment:
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpass
POSTGRES_DB: testplatform
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- test-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U testuser -d testplatform"]
interval: 10s
timeout: 5s
retries: 5
# Redis
redis:
image: redis:7-alpine
container_name: testplatform-redis
ports:
- "6379:6379"
networks:
- test-network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 3
# Backend API
backend:
build: ./backend
container_name: testplatform-backend
ports:
- "8000:8000"
environment:
- DATABASE_URL=postgresql://testuser:testpass@db:5432/testplatform
- REDIS_URL=redis://redis:6379/0
- SECRET_KEY=your-secret-key-change-in-production
- CLAUDE_API_KEY=${CLAUDE_API_KEY:-}
- DOCKER_HOST=unix:///var/run/docker.sock
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./test-files:/test-files
- ./backend:/app
- test_reports:/test-reports
- allure_reports:/allure-reports
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
networks:
- test-network
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8000/health || exit 1"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
command: uvicorn main:app --host 0.0.0.0 --port 8000 --reload
# Frontend
frontend:
build: ./frontend
container_name: testplatform-frontend
ports:
- "80:80"
- "443:443"
environment:
- VITE_API_URL=https://mtp.qa.fortinet-us.com
volumes:
- ./certs:/etc/nginx/ssl:ro
depends_on:
backend:
condition: service_healthy
networks:
- test-network
# Appium Server for Android
appium-android:
image: appium/appium:latest
container_name: testplatform-appium-android
ports:
- "4723:4723"
privileged: true
volumes:
- /dev/bus/usb:/dev/bus/usb
- ./test-files:/test-files
networks:
- test-network
command: appium --allow-insecure chromedriver_autodownload
networks:
test-network:
driver: bridge
ipam:
config:
- subnet: 172.28.0.0/16
volumes:
postgres_data:
test_reports:
allure_reports: