feat(database): add Nacos Pulsar Qdrant and ZooKeeper recipes

This commit is contained in:
二丫讲梵 authored and GitHub committed 2026-07-20 01:51:45 +08:00
1 parent 48dc2dee88
commit 21652bc797
25 files changed
+506 -4

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
services:
database:
image: docker.cnb.cool/znb/images/nacos-server:v3.2.2
container_name: dbx-nacos-3.2
ports:
- "${DB_BIND_ADDRESS:-127.0.0.1}:${NACOS_CONSOLE_PORT:-8010}:8080"
- "${DB_BIND_ADDRESS:-127.0.0.1}:${DB_PORT:-8849}:8848"
- "${DB_BIND_ADDRESS:-127.0.0.1}:${NACOS_GRPC_PORT:-9849}:9848"
- "${DB_BIND_ADDRESS:-127.0.0.1}:${NACOS_RAFT_PORT:-9850}:9849"
environment:
MODE: standalone
PREFER_HOST_MODE: hostname
NACOS_AUTH_SYSTEM_TYPE: nacos
NACOS_AUTH_ENABLE: "true"
NACOS_AUTH_ADMIN_ENABLE: "true"
NACOS_AUTH_CONSOLE_ENABLE: "true"
NACOS_AUTH_TOKEN: "bXlDdXN0b21TZWNyZXRLZXlGb3JOYWNvc1YzMTBNb3JlVGhhbjMyQ2hhcnM="
NACOS_AUTH_IDENTITY_KEY: dbx_nacos_identity
NACOS_AUTH_IDENTITY_VALUE: dbx_nacos_identity_value
JVM_XMS: 256m
JVM_XMX: 256m
JVM_XMN: 128m
volumes:
- data:/home/nacos/data
healthcheck:
test: ["CMD-SHELL", "test \"$$(curl --silent --output /dev/null --write-out '%{http_code}' http://localhost:8848/nacos/v3/auth/user/admin)\" = 405"]
interval: 5s
timeout: 5s
retries: 60
start_period: 20s
volumes:
data:
+3
View File
@@ -0,0 +1,3 @@
# Nacos 3.2 initialization
After the Nacos service becomes healthy, the database environment command synchronously sets the first-run `nacos` administrator password to `123456` (or `DB_PASSWORD`) through the authentication API. Later starts verify those credentials without overwriting the account. The named data volume preserves the initialized account.
+17
View File
@@ -0,0 +1,17 @@
{
"database": "nacos",
"name": "Nacos",
"version": "3.2.2",
"displayVersion": "3.2",
"image": "docker.cnb.cool/znb/images/nacos-server:v3.2.2",
"platforms": ["linux/amd64", "linux/arm64"],
"service": "database",
"defaultPort": 8848,
"connection": { "host": "127.0.0.1", "port": 8849, "username": "nacos", "password": "123456", "database": "dbx", "namespace": "public", "consolePort": 8010 },
"bootstrap": {
"check": { "command": ["curl", "--fail", "--silent", "--show-error", "--request", "POST", "http://127.0.0.1:8848/nacos/v3/auth/user/login", "--data-urlencode", "username=nacos", "--data-urlencode", "password=${DB_PASSWORD}"], "expect": "accessToken" },
"steps": [{ "name": "initialize administrator password", "command": ["sh", "-ec", "curl --fail --silent --show-error --request POST --data-urlencode \"password=$1\" http://127.0.0.1:8848/nacos/v3/auth/user/admin >/dev/null; curl --fail --silent --show-error --request POST http://127.0.0.1:8848/nacos/v3/auth/user/login --data-urlencode username=nacos --data-urlencode \"password=$1\" | grep -q '\"accessToken\"'; printf 'administrator initialized\\n'", "sh", "${DB_PASSWORD}"], "expect": "administrator initialized" }]
},
"shell": ["curl", "--fail", "--silent", "--show-error", "--request", "POST", "http://127.0.0.1:8848/nacos/v3/auth/user/login", "--data-urlencode", "username=nacos", "--data-urlencode", "password=${DB_PASSWORD}"],
"smoke": { "steps": [{ "name": "log in with initialized administrator credentials", "command": ["curl", "--fail", "--silent", "--show-error", "--request", "POST", "http://127.0.0.1:8848/nacos/v3/auth/user/login", "--data-urlencode", "username=nacos", "--data-urlencode", "password=${DB_PASSWORD}"], "expect": "accessToken" }] }
}