Repository navigation
Expand file tree
/
Copy pathcompose.yaml
More file actions
102 lines (95 loc) · 2.54 KB
/
Copy pathcompose.yaml
File metadata and controls
102 lines (95 loc) · 2.54 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
name: attrails
services:
# postgis/postgis only publishes amd64 images; this is the same image built
# for arm64 too, by one of its maintainers.
postgres:
image: imresamu/postgis:18-3.6
environment:
POSTGRES_USER: app
POSTGRES_PASSWORD: app
POSTGRES_DB: attrails
ports:
- "5432:5432"
volumes:
- postgres:/var/lib/postgresql
healthcheck:
test: ["CMD", "pg_isready", "-U", "app", "-d", "attrails"]
interval: 10s
timeout: 5s
retries: 10
rabbitmq:
image: rabbitmq:4.2-management
environment:
RABBITMQ_DEFAULT_USER: app
RABBITMQ_DEFAULT_PASS: app
ports:
- "5672:5672"
- "15672:15672"
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
interval: 10s
timeout: 10s
retries: 10
tap:
image: ghcr.io/bluesky-social/indigo/tap:latest
environment:
TAP_SIGNAL_COLLECTION: app.attrails.actor.profile
TAP_COLLECTION_FILTERS: app.attrails.*
TAP_LOG_LEVEL: info
ports:
- "2480:2480"
healthcheck:
test: ["CMD", "wget", "-q", "-O", "/dev/null", "http://localhost:2480/health"]
interval: 10s
timeout: 5s
retries: 10
# Each service has its own profile, so the one being worked on can run with
# cargo while compose provides everything else, e.g. while developing the
# watcher: `docker compose --profile consumer up`.
ingest-watcher:
profiles: [watcher]
build:
context: .
dockerfile: crates/ingest-watcher/Dockerfile
env_file: .env
environment:
ATTRAILS_RABBITMQ_HOST: amqp://app:app@rabbitmq:5672
ATTRAILS_TAP_URL: tap:2480
ports:
- "8080:8080"
depends_on:
rabbitmq:
condition: service_healthy
tap:
condition: service_healthy
ingest-consumer:
profiles: [consumer]
build:
context: .
dockerfile: crates/ingest-consumer/Dockerfile
env_file: .env
environment:
ATTRAILS_POSTGRES_CONNECTION_URI: postgresql://app:app@postgres:5432/attrails
ATTRAILS_RABBITMQ_HOST: amqp://app:app@rabbitmq:5672
ports:
- "8081:8081"
depends_on:
postgres:
condition: service_healthy
rabbitmq:
condition: service_healthy
web:
profiles: [web]
build:
context: web
dockerfile: Dockerfile
env_file: .env
environment:
ATTRAILS_POSTGRES_CONNECTION_URI: postgresql://app:app@postgres:5432/attrails
ports:
- "3000:3000"
depends_on:
postgres:
condition: service_healthy
volumes:
postgres: