feat(database): add Nacos Pulsar Qdrant and ZooKeeper recipes
This commit is contained in:
25 files changed
+506
-4
No files matched your search
@@ -0,0 +1,29 @@
|
||||
services:
|
||||
database:
|
||||
image: docker.cnb.cool/znb/images/nacos-server:v2.5.2
|
||||
container_name: dbx-nacos-2.5
|
||||
ports:
|
||||
- "${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_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", "curl --fail --silent http://localhost:8848/nacos/v1/console/health/readiness | grep -q OK"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 60
|
||||
start_period: 20s
|
||||
volumes:
|
||||
data:
|
||||
@@ -0,0 +1,3 @@
|
||||
# Nacos 2.5 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.
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"database": "nacos",
|
||||
"name": "Nacos",
|
||||
"version": "2.5.2",
|
||||
"displayVersion": "2.5",
|
||||
"image": "docker.cnb.cool/znb/images/nacos-server:v2.5.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" },
|
||||
"bootstrap": {
|
||||
"check": { "command": ["curl", "--fail", "--silent", "--show-error", "--request", "POST", "http://127.0.0.1:8848/nacos/v1/auth/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/v1/auth/users/admin >/dev/null; curl --fail --silent --show-error --request POST http://127.0.0.1:8848/nacos/v1/auth/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/v1/auth/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/v1/auth/login", "--data-urlencode", "username=nacos", "--data-urlencode", "password=${DB_PASSWORD}"], "expect": "accessToken" }] }
|
||||
}
|
||||
Reference in new issue
Block a user