Add environment configuration and documentation for various services
- Created .env.example files for Kafka, Kibana, KodBox, Kong, Langfuse, Logstash, n8n, Nginx, OceanBase, OpenCoze, RocketMQ, TiDB, and TiKV. - Added README.md and README.zh.md files for OceanBase, RocketMQ, TiDB, and TiKV, detailing usage, configuration, and access instructions. - Implemented docker-compose.yaml files for OceanBase, RocketMQ, TiDB, and TiKV, defining service configurations, health checks, and resource limits. - Included broker.conf for RocketMQ to specify broker settings. - Established a consistent timezone (UTC) across all services. - Provided optional port overrides in .env.example files for flexibility in deployment.
This commit is contained in:
105
src/tidb/docker-compose.yaml
Normal file
105
src/tidb/docker-compose.yaml
Normal file
@@ -0,0 +1,105 @@
|
||||
x-default: &default
|
||||
restart: unless-stopped
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
max-size: 100m
|
||||
max-file: "3"
|
||||
|
||||
services:
|
||||
pd:
|
||||
<<: *default
|
||||
image: pingcap/pd:${TIDB_VERSION:-v8.5.0}
|
||||
command:
|
||||
- --name=pd
|
||||
- --client-urls=http://0.0.0.0:2379
|
||||
- --peer-urls=http://0.0.0.0:2380
|
||||
- --advertise-client-urls=http://pd:2379
|
||||
- --advertise-peer-urls=http://pd:2380
|
||||
- --data-dir=/data
|
||||
environment:
|
||||
TZ: ${TZ:-UTC}
|
||||
volumes:
|
||||
- pd_data:/data
|
||||
ports:
|
||||
- "${TIDB_PD_PORT_OVERRIDE:-2379}:2379"
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 1G
|
||||
reservations:
|
||||
cpus: '0.25'
|
||||
memory: 512M
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "wget -q -O - http://localhost:2379/health || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 30s
|
||||
|
||||
tikv:
|
||||
<<: *default
|
||||
image: pingcap/tikv:${TIDB_VERSION:-v8.5.0}
|
||||
command:
|
||||
- --addr=0.0.0.0:20160
|
||||
- --advertise-addr=tikv:20160
|
||||
- --pd=http://pd:2379
|
||||
- --data-dir=/data
|
||||
environment:
|
||||
TZ: ${TZ:-UTC}
|
||||
volumes:
|
||||
- tikv_data:/data
|
||||
ports:
|
||||
- "${TIDB_TIKV_PORT_OVERRIDE:-20160}:20160"
|
||||
depends_on:
|
||||
pd:
|
||||
condition: service_healthy
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '2.0'
|
||||
memory: 2G
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 1G
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "wget -q -O - http://localhost:20180/status || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
start_period: 60s
|
||||
|
||||
tidb:
|
||||
<<: *default
|
||||
image: pingcap/tidb:${TIDB_VERSION:-v8.5.0}
|
||||
command:
|
||||
- --store=tikv
|
||||
- --path=pd:2379
|
||||
- --advertise-address=tidb
|
||||
environment:
|
||||
TZ: ${TZ:-UTC}
|
||||
ports:
|
||||
- "${TIDB_PORT_OVERRIDE:-4000}:4000"
|
||||
- "${TIDB_STATUS_PORT_OVERRIDE:-10080}:10080"
|
||||
depends_on:
|
||||
tikv:
|
||||
condition: service_healthy
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '2.0'
|
||||
memory: 2G
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 512M
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "wget -q -O - http://localhost:10080/status || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 30s
|
||||
|
||||
volumes:
|
||||
pd_data:
|
||||
tikv_data:
|
||||
Reference in New Issue
Block a user