-
Notifications
You must be signed in to change notification settings - Fork 99
Expand file tree
/
Copy pathdocker-compose.e2e.yml
More file actions
72 lines (66 loc) · 1.8 KB
/
docker-compose.e2e.yml
File metadata and controls
72 lines (66 loc) · 1.8 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
version: '3.8'
# Docker Compose configuration for E2E testing environment
# Usage: docker-compose -f docker-compose.e2e.yml up -d
services:
mysql-test:
image: mysql:8.0
environment:
MYSQL_ROOT_PASSWORD: test123
MYSQL_DATABASE: wegent_e2e
ports:
- "3307:3306"
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- mysql-e2e-data:/var/lib/mysql
redis-test:
image: redis:7-alpine
ports:
- "6380:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
backend-test:
build:
context: ./backend
dockerfile: ../docker/backend/Dockerfile
environment:
DATABASE_URL: mysql+pymysql://root:test123@mysql-test:3306/wegent_e2e
REDIS_URL: redis://redis-test:6379/0
SECRET_KEY: test-secret-key-for-e2e
ENVIRONMENT: test
ports:
- "8001:8000"
depends_on:
mysql-test:
condition: service_healthy
redis-test:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/api/health"]
interval: 10s
timeout: 5s
retries: 5
frontend-test:
build:
context: ./frontend
dockerfile: ../docker/frontend/Dockerfile
environment:
# Runtime variables (can be changed without rebuilding)
RUNTIME_INTERNAL_API_URL: http://backend-test:8000
RUNTIME_PUBLIC_API_URL: http://backend-test:8000
RUNTIME_SOCKET_DIRECT_URL: http://backend-test:8000
# Legacy: NEXT_PUBLIC_API_URL is deprecated
# NEXT_PUBLIC_API_URL: http://backend-test:8000
ports:
- "3001:3000"
depends_on:
backend-test:
condition: service_healthy
volumes:
mysql-e2e-data: