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
name: udb-acme-billing-php-example
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_DB: udb
POSTGRES_USER: udb
POSTGRES_PASSWORD: udb
ports:
- "${UDB_POSTGRES_PORT:-55432}:5432"
healthcheck:
test:
interval: 5s
timeout: 3s
retries: 20
redis:
image: redis:7-alpine
ports:
- "${UDB_REDIS_PORT:-56379}:6379"
healthcheck:
test:
interval: 5s
timeout: 3s
retries: 20
qdrant:
image: qdrant/qdrant:v1.13.4
ports:
- "${UDB_QDRANT_PORT:-56333}:6333"
minio:
image: minio/minio:RELEASE.2025-01-20T14-49-07Z
command: server /data --console-address ":9001"
environment:
MINIO_ROOT_USER: minio
MINIO_ROOT_PASSWORD: minio123
ports:
- "${UDB_MINIO_PORT:-59000}:9000"
- "${UDB_MINIO_CONSOLE_PORT:-59001}:9001"
minio-init:
image: minio/mc:latest
depends_on:
- minio
entrypoint: >
/bin/sh -c "
until mc alias set local http://minio:9000 minio minio123; do sleep 2; done;
mc mb --ignore-existing local/acme-billing-documents;
"
udb-cli:
# glibc base with curl: the released CLI is a linux-gnu binary and will not
# run on Alpine/musl.
image: buildpack-deps:noble-curl
profiles:
user: "0:0"
working_dir: /workspace
entrypoint:
environment:
UDB_CLI_URL: ${UDB_CLI_URL:-https://github.com/fahara02/udb/releases/latest/download/udb-proto-parser-linux-amd64}
UDB_DB_OPS_ROOT: /workspace/db_ops
UDB_PG_DSN: postgres://udb:udb@postgres:5432/udb
UDB_CACHE_DSN: redis://redis:6379
UDB_REDIS_DSN: redis://redis:6379
UDB_QDRANT_URL: http://qdrant:6333
UDB_MINIO_ENDPOINT: http://minio:9000
UDB_MINIO_ACCESS_KEY: minio
UDB_MINIO_SECRET_KEY: minio123
AWS_ACCESS_KEY_ID: minio
AWS_SECRET_ACCESS_KEY: minio123
UDB_ABAC_DEFAULT_ALLOW: "true"
UDB_ALLOW_DEGRADED_BACKENDS: "false"
volumes:
- ./:/workspace
udb-broker:
# glibc base with curl: the released CLI is a linux-gnu binary and will not
# run on Alpine/musl.
image: buildpack-deps:noble-curl
entrypoint:
command:
environment:
UDB_CLI_URL: ${UDB_CLI_URL:-https://github.com/fahara02/udb/releases/latest/download/udb-proto-parser-linux-amd64}
UDB_PG_DSN: postgres://udb:udb@postgres:5432/udb
UDB_CACHE_DSN: redis://redis:6379
UDB_REDIS_DSN: redis://redis:6379
UDB_QDRANT_URL: http://qdrant:6333
UDB_MINIO_ENDPOINT: http://minio:9000
UDB_MINIO_ACCESS_KEY: minio
UDB_MINIO_SECRET_KEY: minio123
AWS_ACCESS_KEY_ID: minio
AWS_SECRET_ACCESS_KEY: minio123
UDB_DB_OPS_ROOT: /workspace/db_ops
UDB_ENCRYPTION_KEY: "00000000000000000000000000000000"
UDB_ABAC_DEFAULT_ALLOW: "true"
UDB_ALLOW_HEADER_SCOPES: "true"
UDB_TLS_REQUIRED: "false"
UDB_MTLS_REQUIRED: "false"
UDB_ALLOW_DEGRADED_BACKENDS: "false"
UDB_RATE_LIMIT_ENABLED: "false"
RUST_LOG: info
ports:
- "${UDB_GRPC_PORT:-50051}:50051"
- "${UDB_METRICS_PORT:-50052}:50052"
volumes:
- ./:/workspace
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
qdrant:
condition: service_started
minio-init:
condition: service_completed_successfully
smoke:
build:
context: .
dockerfile: Dockerfile.smoke
profiles:
working_dir: /workspace
depends_on:
udb-broker:
condition: service_started
environment:
UDB_TARGET: udb-broker:50051
volumes:
- ./:/workspace
command:
- /bin/sh
- -lc
- |
if [ ! -d vendor ]; then php84 /usr/bin/composer.phar install; fi
php84 acme_billing.php