Repository navigation
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
138 lines (130 loc) · 3.74 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
138 lines (130 loc) · 3.74 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
134
135
136
137
138
# Copyright 2024 Blnk Finance Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
services:
server:
image: ${LEDGERFORGE_IMAGE:-ghcr.io/devaccuracy/ledgerforge:main}
restart: on-failure
entrypoint: ["/bin/sh", "-c"]
command:
- "ledgerforge migrate up && ledgerforge start"
environment:
TZ: ${TZ:-Etc/UTC}
ports:
- "127.0.0.1:${LEDGERFORGE_API_PORT:-5001}:5001"
depends_on:
redis:
condition: service_started
postgres:
condition: service_healthy
volumes:
- type: bind
source: ./ledgerforge.json
target: /ledgerforge.json
read_only: true
bind:
create_host_path: false
healthcheck:
test: ["CMD", "bash", "-c", "exec 3<>/dev/tcp/127.0.0.1/5001; printf 'GET /health HTTP/1.1\r\nHost: localhost\r\nConnection: close\r\n\r\n' >&3; head -n 1 <&3 | grep -q '200'"]
interval: 5s
timeout: 5s
retries: 30
start_period: 10s
worker:
image: ${LEDGERFORGE_IMAGE:-ghcr.io/devaccuracy/ledgerforge:main}
restart: on-failure
entrypoint: ["ledgerforge", "workers"]
ports:
- "127.0.0.1:5004:5004"
depends_on:
server:
condition: service_healthy
redis:
condition: service_started
postgres:
condition: service_healthy
volumes:
- type: bind
source: ./ledgerforge.json
target: /ledgerforge.json
read_only: true
bind:
create_host_path: false
redis:
image: redis:7.2.4
restart: on-failure
postgres:
image: ${POSTGRES_IMAGE:-postgres:16}
restart: on-failure
ports:
- "127.0.0.1:${POSTGRES_OUTER_PORT:-55432}:5432"
environment:
TZ: ${TZ:-Etc/UTC}
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password}
POSTGRES_DB: ${POSTGRES_DB:-ledgerforge}
volumes:
- pg_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER:-postgres}"]
interval: 10s
timeout: 5s
retries: 5
typesense:
image: typesense/typesense:29.0
profiles:
- search
command:
["--data-dir", "/data", "--api-key=ledgerforge-api-key", "--listen-port", "8108"]
environment:
TYPESENSE_MEMORY_USED_MAX_PERCENTAGE: "${TYPESENSE_MEMORY_USED_MAX_PERCENTAGE:-85}"
ports:
- "127.0.0.1:8108:8108"
volumes:
- typesense_data:/data
logging:
driver: "none"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8108/health"]
interval: 30s
timeout: 10s
retries: 5
jaeger:
image: jaegertracing/all-in-one:latest
profiles:
- tracing
ports:
- "127.0.0.1:16686:16686" # Jaeger UI
- "127.0.0.1:4317:4317" # OTLP gRPC
- "127.0.0.1:4318:4318" # OTLP HTTP
environment:
- COLLECTOR_OTLP_ENABLED=true
healthcheck:
test: ["CMD", "wget", "--spider", "http://localhost:16686"]
interval: 10s
timeout: 5s
retries: 3
prometheus:
image: prom/prometheus:latest
profiles:
- monitoring
ports:
- "127.0.0.1:9090:9090"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
depends_on:
- server
- worker
volumes:
pg_data:
typesense_data: