-
Notifications
You must be signed in to change notification settings - Fork 15
/
docker-compose.dev.yaml
112 lines (104 loc) · 2.77 KB
/
docker-compose.dev.yaml
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
# 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.
version: '3.8'
services:
server:
build: .
container_name: server
restart: on-failure
environment:
TZ: ${TZ:-Etc/UTC}
OTEL_EXPORTER_OTLP_ENDPOINT: jaeger:4318
ports:
- "5002:5002"
- "80:80"
- "443:443"
depends_on:
- redis
- postgres
- jaeger
volumes:
- ./blnk.json:/blnk.json
worker:
build: .
container_name: worker
restart: on-failure
entrypoint: [ "blnk", "workers"]
environment:
OTEL_EXPORTER_OTLP_ENDPOINT: jaeger:4318
depends_on:
- redis
- postgres
- jaeger
volumes:
- ./blnk.json:/blnk.json
migration:
build: .
entrypoint: [ "blnk", "migrate","up" ]
restart: on-failure
depends_on:
- postgres
volumes:
- ./blnk.json:/blnk.json
redis:
image: redis:7.2.4
container_name: redis
postgres:
image: ${POSTGRES_IMAGE:-postgres:16}
container_name: ${POSTGRES_CONTAINER:-postgres}
restart: on-failure
ports:
- "${POSTGRES_OUTER_PORT:-5432}:5432"
environment:
TZ: ${TZ:-Etc/UTC}
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password}
POSTGRES_DB: ${POSTGRES_DB:-blnk}
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:0.23.1
container_name: typesense
command: ["--data-dir", "/data", "--api-key=blnk-api-key", "--listen-port", "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
container_name: jaeger
ports:
- "16686:16686" # Jaeger UI
- "4317:4317" # OTLP gRPC
- "4318:4318" # OTLP HTTP
environment:
- COLLECTOR_OTLP_ENABLED=true
healthcheck:
test: ["CMD", "wget", "--spider", "http://localhost:16686"]
interval: 10s
timeout: 5s
retries: 3
volumes:
pg_data:
typesense_data: