-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
115 lines (107 loc) · 3.02 KB
/
docker-compose.yml
File metadata and controls
115 lines (107 loc) · 3.02 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
services:
postgres:
image: postgres:16
environment:
POSTGRES_USER: ${POSTGRES_USER:-user}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password}
POSTGRES_DB: ${POSTGRES_DB:-database}
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -U ${POSTGRES_USER:-user} -d ${POSTGRES_DB:-database}",
]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
restart: unless-stopped
rpc:
image: prod-template-image:latest
command: ["/app/rpc"]
ports:
- "8000:8000"
environment:
RUST_LOG: "info,sqlx=off,sea_orm_migration=off"
DATABASE_URL: postgresql://user:password@postgres:5432/database
SOCKET: 0.0.0.0:8000
# healthcheck:
# test:
# [
# "CMD-SHELL",
# "curl --fail http://localhost:8000/_status/live || exit 1",
# ]
# interval: 2s
# timeout: 5s
# retries: 5
depends_on:
- postgres
restart: unless-stopped
worker:
image: prod-template-image:latest
command: ["/app/worker"]
environment:
RUST_LOG: "info,sqlx=off,sea_orm_migration=off"
DATABASE_URL: postgresql://user:password@postgres:5432/database
depends_on:
- postgres
- rpc
restart: unless-stopped
spammer:
image: prod-template-image:latest
command: ["/app/spammer"]
environment:
RUST_LOG: "info"
PRIVATE_KEYS: "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80,0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d,0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a,0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6"
RPC: http://rpc:8000
depends_on:
- postgres
restart: unless-stopped
# DB explorer in web browser
# http://localhost:7403/?pgsql=postgres&username=user&db=database&ns=public
# Password: password
adminer:
image: adminer
ports:
- 7403:8080
restart: unless-stopped
# Grafana: http://localhost:3000/
# User: admin, Password: admin
grafana:
image: grafana/grafana:latest
ports:
- "3000:3000"
environment:
GF_SECURITY_ADMIN_USER: ${GRAFANA_USER:-admin}
GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_PASSWORD:-admin}
volumes:
- grafana-data:/var/lib/grafana
- ./grafana:/etc/grafana/provisioning
restart: unless-stopped
loki:
image: grafana/loki:latest
ports:
- "3100:3100"
command: -config.file=/etc/loki/local-config.yaml
volumes:
- loki-data:/loki
restart: unless-stopped
alloy:
image: grafana/alloy:latest
ports:
- "12345:12345"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./grafana/alloy:/etc/alloy
command: run --server.http.listen-addr=0.0.0.0:12345 --storage.path=/var/lib/alloy/data /etc/alloy/config.alloy
depends_on:
- loki
restart: unless-stopped
volumes:
pgdata:
grafana-data:
loki-data: