Repository navigation
Expand file tree
/
Copy pathdocker-compose.dev.yaml
More file actions
145 lines (137 loc) · 3.8 KB
/
Copy pathdocker-compose.dev.yaml
File metadata and controls
145 lines (137 loc) · 3.8 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
139
140
141
142
143
144
145
# 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:
build: .
restart: on-failure
environment:
TZ: ${TZ:-Etc/UTC}
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: http://jaeger:4318/v1/traces
ports:
- "127.0.0.1:${LEDGERFORGE_API_PORT:-5001}:5001"
- "127.0.0.1:80:80"
- "127.0.0.1:443:443"
depends_on:
migration:
condition: service_completed_successfully
redis:
condition: service_started
jaeger:
condition: service_started
volumes:
- type: bind
source: ./ledgerforge.json
target: /ledgerforge.json
read_only: true
bind:
create_host_path: false
worker:
build: .
restart: on-failure
entrypoint: ["ledgerforge", "workers"]
environment:
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: http://jaeger:4318/v1/traces
ports:
- "127.0.0.1:5004:5004"
depends_on:
migration:
condition: service_completed_successfully
redis:
condition: service_started
jaeger:
condition: service_started
volumes:
- type: bind
source: ./ledgerforge.json
target: /ledgerforge.json
read_only: true
bind:
create_host_path: false
migration:
build: .
entrypoint: ["ledgerforge", "migrate", "up"]
restart: on-failure
depends_on:
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
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
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
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: