Repository navigation
Expand file tree
/
Copy pathdocker-compose.ci.yml
More file actions
84 lines (79 loc) · 2.06 KB
/
Copy pathdocker-compose.ci.yml
File metadata and controls
84 lines (79 loc) · 2.06 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
# CI/local integration-test stack. Mastodon production mode forces SSL, so an
# nginx sidecar terminates TLS with a self-signed cert and forwards
# X-Forwarded-Proto: https.
services:
db:
image: postgres:15-alpine
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 2s
timeout: 5s
retries: 30
redis:
image: redis:7-alpine
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 2s
timeout: 5s
retries: 30
web:
image: ghcr.io/mastodon/mastodon:v4.4.8
env_file: scripts/ci/.env.mastodon
command: bundle exec puma -C config/puma.rb
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl -fsS http://localhost:3000/health || exit 1"]
interval: 5s
timeout: 5s
retries: 60
sidekiq:
image: ghcr.io/mastodon/mastodon:v4.4.8
env_file: scripts/ci/.env.mastodon
command: bundle exec sidekiq
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "ps aux | grep '[s]idekiq' || exit 1"]
interval: 5s
timeout: 5s
retries: 30
streaming:
image: ghcr.io/mastodon/mastodon-streaming:v4.3.8
env_file: scripts/ci/.env.mastodon
command: node ./streaming
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test:
[
"CMD-SHELL",
"wget -q --spider --proxy=off localhost:4000/api/v1/streaming/health || exit 1"
]
interval: 5s
timeout: 5s
retries: 30
nginx:
image: nginx:1.27-alpine
ports:
- "3000:3000"
volumes:
- ./scripts/ci/nginx.conf:/etc/nginx/nginx.conf:ro
- ./scripts/ci/certs:/etc/nginx/certs:ro
depends_on:
web:
condition: service_healthy
streaming:
condition: service_healthy