-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
125 lines (116 loc) · 2.76 KB
/
docker-compose.yml
File metadata and controls
125 lines (116 loc) · 2.76 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
# Docker Compose for EmailEngine PHP SDK Development and Testing
#
# Usage:
# docker compose up -d # Start EmailEngine + Redis
# docker compose run --rm test # Run unit tests
# docker compose run --rm integration # Run integration tests
# docker compose down -v # Stop and clean up
services:
# Redis - required by EmailEngine
redis:
image: redis:7-alpine
ports:
- "6379:6379"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
# EmailEngine - email gateway service
emailengine:
image: postalsys/emailengine:latest
ports:
- "3000:3000"
- "2525:2525" # SMTP
- "9993:9993" # IMAP proxy
environment:
# Redis connection
EENGINE_REDIS: "redis://redis:6379"
# Disable TLS for local testing
EENGINE_API_PROXY: "false"
# Enable verbose logging
EENGINE_LOG_LEVEL: "trace"
# Disable rate limiting for tests
EENGINE_API_RATE_LIMIT: "0"
depends_on:
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-sf", "http://localhost:3000/v1/stats"]
interval: 10s
timeout: 5s
retries: 12
start_period: 30s
# Unit tests - runs with mocked HTTP responses
test:
build:
context: .
dockerfile: docker/Dockerfile.test
args:
PHP_VERSION: "8.3"
volumes:
- .:/app
- /app/vendor
command: ["./vendor/bin/phpunit", "--testsuite", "unit"]
# Integration tests - runs against real EmailEngine
integration:
build:
context: .
dockerfile: docker/Dockerfile.integration
args:
PHP_VERSION: "8.3"
volumes:
- .:/app
- /app/vendor
environment:
REDIS_URL: "redis://redis:6379"
EMAILENGINE_URL: "http://emailengine:3000"
depends_on:
emailengine:
condition: service_healthy
redis:
condition: service_healthy
# PHP 8.1 tests
test-php81:
build:
context: .
dockerfile: docker/Dockerfile.test
args:
PHP_VERSION: "8.1"
volumes:
- .:/app
- /app/vendor
# PHP 8.2 tests
test-php82:
build:
context: .
dockerfile: docker/Dockerfile.test
args:
PHP_VERSION: "8.2"
volumes:
- .:/app
- /app/vendor
# PHP 8.3 tests
test-php83:
build:
context: .
dockerfile: docker/Dockerfile.test
args:
PHP_VERSION: "8.3"
volumes:
- .:/app
- /app/vendor
# PHP 8.4 tests
test-php84:
build:
context: .
dockerfile: docker/Dockerfile.test
args:
PHP_VERSION: "8.4"
volumes:
- .:/app
- /app/vendor
volumes:
redis_data: