-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcompose.yml
More file actions
133 lines (127 loc) · 4.27 KB
/
compose.yml
File metadata and controls
133 lines (127 loc) · 4.27 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
126
127
128
129
130
131
132
133
name: trogonai
services:
nats:
image: nats:alpine
command:
- "--jetstream"
- "--store_dir=/data"
- "--http_port=8222"
volumes:
- nats_data:/data
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:8222/healthz"]
interval: 5s
timeout: 3s
start_period: 5s
retries: 3
trogon-source-github:
build:
context: ../../../rsworkspace
dockerfile: ../devops/docker/compose/services/trogon-source-github/Dockerfile
environment:
NATS_URL: "nats:4222"
GITHUB_WEBHOOK_SECRET: "${GITHUB_WEBHOOK_SECRET:-}"
GITHUB_WEBHOOK_PORT: "${GITHUB_WEBHOOK_PORT:-8080}"
GITHUB_SUBJECT_PREFIX: "${GITHUB_SUBJECT_PREFIX:-github}"
GITHUB_STREAM_NAME: "${GITHUB_STREAM_NAME:-GITHUB}"
GITHUB_STREAM_MAX_AGE_SECS: "${GITHUB_STREAM_MAX_AGE_SECS:-604800}"
GITHUB_NATS_ACK_TIMEOUT_SECS: "${GITHUB_NATS_ACK_TIMEOUT_SECS:-10}"
GITHUB_MAX_BODY_SIZE: "${GITHUB_MAX_BODY_SIZE:-26214400}"
RUST_LOG: "${RUST_LOG:-info}"
depends_on:
nats:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-sf", "http://localhost:${GITHUB_WEBHOOK_PORT:-8080}/health"]
interval: 10s
timeout: 3s
start_period: 10s
retries: 3
trogon-source-linear:
build:
context: ../../../rsworkspace
dockerfile: ../devops/docker/compose/services/trogon-source-linear/Dockerfile
environment:
NATS_URL: "nats:4222"
LINEAR_WEBHOOK_SECRET: "${LINEAR_WEBHOOK_SECRET}"
LINEAR_WEBHOOK_PORT: "${LINEAR_WEBHOOK_PORT:-8080}"
LINEAR_SUBJECT_PREFIX: "${LINEAR_SUBJECT_PREFIX:-linear}"
LINEAR_STREAM_NAME: "${LINEAR_STREAM_NAME:-LINEAR}"
LINEAR_STREAM_MAX_AGE_SECS: "${LINEAR_STREAM_MAX_AGE_SECS:-604800}"
LINEAR_WEBHOOK_TIMESTAMP_TOLERANCE_SECS: "${LINEAR_WEBHOOK_TIMESTAMP_TOLERANCE_SECS:-60}"
LINEAR_NATS_ACK_TIMEOUT_MS: "${LINEAR_NATS_ACK_TIMEOUT_MS:-10000}"
RUST_LOG: "${RUST_LOG:-info}"
depends_on:
nats:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-sf", "http://localhost:${LINEAR_WEBHOOK_PORT:-8080}/health"]
interval: 10s
timeout: 3s
start_period: 10s
retries: 3
trogon-source-slack:
build:
context: ../../../rsworkspace
dockerfile: ../devops/docker/compose/services/trogon-source-slack/Dockerfile
environment:
NATS_URL: "nats:4222"
SLACK_SIGNING_SECRET: "${SLACK_SIGNING_SECRET:-}"
SLACK_WEBHOOK_PORT: "${SLACK_WEBHOOK_PORT:-3000}"
SLACK_SUBJECT_PREFIX: "${SLACK_SUBJECT_PREFIX:-slack}"
SLACK_STREAM_NAME: "${SLACK_STREAM_NAME:-SLACK}"
SLACK_STREAM_MAX_AGE_SECS: "${SLACK_STREAM_MAX_AGE_SECS:-604800}"
SLACK_NATS_ACK_TIMEOUT_SECS: "${SLACK_NATS_ACK_TIMEOUT_SECS:-10}"
SLACK_MAX_BODY_SIZE: "${SLACK_MAX_BODY_SIZE:-1048576}"
SLACK_TIMESTAMP_MAX_DRIFT_SECS: "${SLACK_TIMESTAMP_MAX_DRIFT_SECS:-300}"
RUST_LOG: "${RUST_LOG:-info}"
depends_on:
nats:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-sf", "http://localhost:${SLACK_WEBHOOK_PORT:-3000}/health"]
interval: 10s
timeout: 3s
start_period: 10s
retries: 3
ngrok:
image: ngrok/ngrok:alpine
environment:
NGROK_AUTHTOKEN: "${NGROK_AUTHTOKEN:-}"
GITHUB_ADDR: "trogon-source-github:${GITHUB_WEBHOOK_PORT:-8080}"
LINEAR_ADDR: "trogon-source-linear:${LINEAR_WEBHOOK_PORT:-8080}"
SLACK_ADDR: "trogon-source-slack:${SLACK_WEBHOOK_PORT:-3000}"
entrypoint:
- /bin/sh
- -c
- |
cat > /tmp/ngrok.yml <<EOF
version: 3
tunnels:
github:
addr: $${GITHUB_ADDR}
proto: http
linear:
addr: $${LINEAR_ADDR}
proto: http
slack:
addr: $${SLACK_ADDR}
proto: http
EOF
exec ngrok start --all --config /tmp/ngrok.yml
depends_on:
trogon-source-github:
condition: service_healthy
trogon-source-linear:
condition: service_healthy
trogon-source-slack:
condition: service_healthy
restart: unless-stopped
profiles:
- dev
volumes:
nats_data: