diff --git a/.compose-template.yaml b/.compose-template.yaml index 9ef66bc..af3f7e4 100644 --- a/.compose-template.yaml +++ b/.compose-template.yaml @@ -31,8 +31,8 @@ services: deploy: resources: limits: - cpus: ${SERVICE_NAME_CPU_LIMIT:-1.00} - memory: ${SERVICE_NAME_MEMORY_LIMIT:-512M} + cpus: ${SERVICE_NAME_CPU_LIMIT:-0.50} + memory: ${SERVICE_NAME_MEMORY_LIMIT:-256M} reservations: cpus: ${SERVICE_NAME_CPU_RESERVATION:-0.25} memory: ${SERVICE_NAME_MEMORY_RESERVATION:-128M} diff --git a/README.md b/README.md index c01446d..378c387 100644 --- a/README.md +++ b/README.md @@ -4,76 +4,105 @@ Compose Anything helps users quickly deploy various services by providing a set ## Supported Services -| Service | Version | -| -------------------------------------------------------- | ---------------------------- | -| [Apache APISIX](./src/apisix) | 3.13.0 | -| [Apache Cassandra](./src/cassandra) | 5.0.2 | -| [Apache HTTP Server](./src/apache) | 2.4.62 | -| [Apache Kafka](./src/kafka) | 7.8.0 | -| [Bifrost Gateway](./src/bifrost-gateway) | 1.2.15 | -| [Bytebot](./src/bytebot) | edge | -| [Clash](./src/clash) | 1.18.0 | -| [Dify](./src/dify) | 0.18.2 | -| [DNSMasq](./src/dnsmasq) | 2.91 | -| [Docker Registry](./src/docker-registry) | 3.0.0 | -| [Elasticsearch](./src/elasticsearch) | 8.16.1 | -| [etcd](./src/etcd) | 3.6.0 | -| [frpc](./src/frpc) | 0.64.0 | -| [frps](./src/frps) | 0.64.0 | -| [Gitea Runner](./src/gitea-runner) | 0.2.12 | -| [Gitea](./src/gitea) | 1.24.6 | -| [GitLab Runner](./src/gitlab-runner) | 17.10.1 | -| [GitLab](./src/gitlab) | 17.10.4-ce.0 | -| [GPUStack](./src/gpustack) | v0.5.3 | -| [Grafana](./src/grafana) | 12.1.1 | -| [Halo](./src/halo) | 2.21.9 | -| [Harbor](./src/harbor) | v2.12.0 | -| [HashiCorp Consul](./src/consul) | 1.20.3 | -| [IOPaint](./src/io-paint) | latest | -| [Jenkins](./src/jenkins) | 2.486-lts | -| [JODConverter](./src/jodconverter) | latest | -| [Kibana](./src/kibana) | 8.16.1 | -| [Kodbox](./src/kodbox) | 1.62 | -| [Kong](./src/kong) | 3.8.0 | -| [LibreOffice](./src/libreoffice) | latest | -| [Langfuse](./src/langfuse) | 3.115.0 | -| [LiteLLM](./src/litellm) | main-stable | -| [Logstash](./src/logstash) | 8.16.1 | -| [Milvus Standalone Embed](./src/milvus-standalone-embed) | 2.6.2 | -| [Milvus Standalone](./src/milvus-standalone) | 2.6.2 | -| [MinerU SGALNG](./src/mineru-sgalng) | 2.2.2 | -| [MinerU v2](./src/mineru-v2) | 2.5.3 | -| [MinIO](./src/minio) | RELEASE.2025-09-07T16-13-09Z | -| [MongoDB ReplicaSet](./src/mongodb-replicaset) | 8.0.13 | -| [MongoDB Standalone](./src/mongodb-standalone) | 8.0.13 | -| [MySQL](./src/mysql) | 9.4.0 | -| [n8n](./src/n8n) | 1.114.0 | -| [Nacos](./src/nacos) | v3.1.0 | -| [NebulaGraph](./src/nebulagraph) | v3.8.0 | -| [Neo4j](./src/neo4j) | 5.27.4 | -| [Nginx](./src/nginx) | 1.29.1 | -| [Node Exporter](./src/node-exporter) | v1.8.2 | -| [Odoo](./src/odoo) | 19.0 | -| [Ollama](./src/ollama) | 0.12.0 | -| [Open WebUI](./src/open-webui) | main | -| [OpenCoze](./src/opencoze) | See Docs | -| [OpenCut](./src/opencut) | latest | -| [OpenList](./src/openlist) | latest | -| [PocketBase](./src/pocketbase) | 0.30.0 | -| [Portainer](./src/portainer) | 2.27.3-alpine | -| [Portkey AI Gateway](./src/portkey-gateway) | latest | -| [PostgreSQL](./src/postgres) | 17.6 | -| [Prometheus](./src/prometheus) | 3.5.0 | -| [Qdrant](./src/qdrant) | 1.15.4 | -| [RabbitMQ](./src/rabbitmq) | 4.1.4 | -| [Redis Cluster](./src/redis-cluster) | 8.2.1 | -| [Redis](./src/redis) | 8.2.1 | -| [Restate Cluster](./src/restate-cluster) | 1.5.3 | -| [Restate](./src/restate) | 1.5.3 | -| [SearXNG](./src/searxng) | 2025.1.20-1ce14ef99 | -| [Verdaccio](./src/verdaccio) | 6.1.2 | -| [vLLM](./src/vllm) | v0.8.0 | -| [ZooKeeper](./src/zookeeper) | 3.9.3 | +| Service | Version | +| ------------------------------------------------------------- | ---------------------------- | +| [Apache APISIX](./src/apisix) | 3.13.0 | +| [Apache Cassandra](./src/cassandra) | 5.0.2 | +| [Apache Flink](./src/flink) | 1.20.0 | +| [Apache HBase](./src/hbase) | 2.6 | +| [Apache HTTP Server](./src/apache) | 2.4.62 | +| [Apache Kafka](./src/kafka) | 7.8.0 | +| [Apache RocketMQ](./src/rocketmq) | 5.3.1 | +| [Bifrost Gateway](./src/bifrost-gateway) | 1.2.15 | +| [Bolt.diy](./src/bolt-diy) | latest | +| [Budibase](./src/budibase) | 3.23.0 | +| [Bytebot](./src/bytebot) | edge | +| [Clash](./src/clash) | 1.18.0 | +| [ClickHouse](./src/clickhouse) | 24.11.1 | +| [Conductor](./src/conductor) | latest | +| [Dify](./src/dify) | 0.18.2 | +| [DNSMasq](./src/dnsmasq) | 2.91 | +| [Dockge](./src/dockge) | 1 | +| [Docker Registry](./src/docker-registry) | 3.0.0 | +| [DuckDB](./src/duckdb) | v1.1.3 | +| [Easy Dataset](./src/easy-dataset) | 1.5.1 | +| [Elasticsearch](./src/elasticsearch) | 8.16.1 | +| [etcd](./src/etcd) | 3.6.0 | +| [Firecrawl](./src/firecrawl) | latest | +| [frpc](./src/frpc) | 0.64.0 | +| [frps](./src/frps) | 0.64.0 | +| [Gitea Runner](./src/gitea-runner) | 0.2.12 | +| [Gitea](./src/gitea) | 1.24.6 | +| [GitLab Runner](./src/gitlab-runner) | 17.10.1 | +| [GitLab](./src/gitlab) | 17.10.4-ce.0 | +| [GPUStack](./src/gpustack) | v0.5.3 | +| [Grafana](./src/grafana) | 12.1.1 | +| [Halo](./src/halo) | 2.21.9 | +| [Harbor](./src/harbor) | v2.12.0 | +| [HashiCorp Consul](./src/consul) | 1.20.3 | +| [IOPaint](./builds/io-paint) | latest | +| [Jenkins](./src/jenkins) | 2.486-lts | +| [JODConverter](./src/jodconverter) | latest | +| [Kestra](./src/kestra) | latest-full | +| [Kibana](./src/kibana) | 8.16.1 | +| [Kodbox](./src/kodbox) | 1.62 | +| [Kong](./src/kong) | 3.8.0 | +| [Langflow](./src/langflow) | latest | +| [Langfuse](./src/langfuse) | 3.115.0 | +| [LibreOffice](./src/libreoffice) | latest | +| [LiteLLM](./src/litellm) | main-stable | +| [Logstash](./src/logstash) | 8.16.1 | +| [MariaDB Galera Cluster](./src/mariadb-galera) | 11.7.2 | +| [Milvus Standalone Embed](./src/milvus-standalone-embed) | 2.6.2 | +| [Milvus Standalone](./src/milvus-standalone) | 2.6.2 | +| [Minecraft Bedrock Server](./src/minecraft-bedrock-server) | latest | +| [MinerU SGALNG](./src/mineru-sgalng) | 2.2.2 | +| [MinerU vLLM](./builds/mineru-vllm) | 2.5.4 | +| [MinIO](./src/minio) | RELEASE.2025-09-07T16-13-09Z | +| [MLflow](./src/mlflow) | v2.20.2 | +| [MongoDB ReplicaSet Single](./src/mongodb-replicaset-single) | 8.0.13 | +| [MongoDB ReplicaSet](./src/mongodb-replicaset) | 8.0.13 | +| [MongoDB Standalone](./src/mongodb-standalone) | 8.0.13 | +| [MySQL](./src/mysql) | 9.4.0 | +| [n8n](./src/n8n) | 1.114.0 | +| [Nacos](./src/nacos) | v3.1.0 | +| [NebulaGraph](./src/nebulagraph) | v3.8.0 | +| [Neo4j](./src/neo4j) | 5.27.4 | +| [Nginx](./src/nginx) | 1.29.1 | +| [Node Exporter](./src/node-exporter) | v1.8.2 | +| [OceanBase](./src/oceanbase) | 4.3.3 | +| [Odoo](./src/odoo) | 19.0 | +| [Ollama](./src/ollama) | 0.12.0 | +| [Open WebUI](./src/open-webui) | main | +| [OpenCoze](./src/opencoze) | See Docs | +| [OpenCut](./src/opencut) | latest | +| [OpenList](./src/openlist) | latest | +| [OpenSearch](./src/opensearch) | 2.19.0 | +| [PocketBase](./src/pocketbase) | 0.30.0 | +| [Portainer](./src/portainer) | 2.27.3-alpine | +| [Portkey AI Gateway](./src/portkey-gateway) | latest | +| [PostgreSQL](./src/postgres) | 17.6 | +| [Prometheus](./src/prometheus) | 3.5.0 | +| [PyTorch](./src/pytorch) | 2.6.0 | +| [Qdrant](./src/qdrant) | 1.15.4 | +| [RabbitMQ](./src/rabbitmq) | 4.1.4 | +| [Ray](./src/ray) | 2.42.1 | +| [Redis Cluster](./src/redis-cluster) | 8.2.1 | +| [Redis](./src/redis) | 8.2.1 | +| [Restate Cluster](./src/restate-cluster) | 1.5.3 | +| [Restate](./src/restate) | 1.5.3 | +| [SearXNG](./src/searxng) | 2025.1.20-1ce14ef99 | +| [Stable Diffusion WebUI](./src/stable-diffusion-webui-docker) | latest | +| [Stirling-PDF](./src/stirling-pdf) | latest | +| [Temporal](./src/temporal) | 1.24.2 | +| [TiDB](./src/tidb) | v8.5.0 | +| [TiKV](./src/tikv) | v8.5.0 | +| [Valkey Cluster](./src/valkey-cluster) | 8.0 | +| [Valkey](./src/valkey) | 8.0 | +| [Verdaccio](./src/verdaccio) | 6.1.2 | +| [vLLM](./src/vllm) | v0.8.0 | +| [Windmill](./src/windmill) | main | +| [ZooKeeper](./src/zookeeper) | 3.9.3 | ## MCP Servers diff --git a/README.zh.md b/README.zh.md index 0fa6d55..db80849 100644 --- a/README.zh.md +++ b/README.zh.md @@ -4,76 +4,105 @@ Compose Anything 通过提供一组高质量的 Docker Compose 配置文件, ## 已经支持的服务 -| 服务 | 版本 | -| -------------------------------------------------------- | ---------------------------- | -| [Apache APISIX](./src/apisix) | 3.13.0 | -| [Apache Cassandra](./src/cassandra) | 5.0.2 | -| [Apache HTTP Server](./src/apache) | 2.4.62 | -| [Apache Kafka](./src/kafka) | 7.8.0 | -| [Bifrost Gateway](./src/bifrost-gateway) | 1.2.15 | -| [Bytebot](./src/bytebot) | edge | -| [Clash](./src/clash) | 1.18.0 | -| [Dify](./src/dify) | 0.18.2 | -| [DNSMasq](./src/dnsmasq) | 2.91 | -| [Docker Registry](./src/docker-registry) | 3.0.0 | -| [Elasticsearch](./src/elasticsearch) | 8.16.1 | -| [etcd](./src/etcd) | 3.6.0 | -| [frpc](./src/frpc) | 0.64.0 | -| [frps](./src/frps) | 0.64.0 | -| [Gitea Runner](./src/gitea-runner) | 0.2.12 | -| [Gitea](./src/gitea) | 1.24.6 | -| [GitLab Runner](./src/gitlab-runner) | 17.10.1 | -| [GitLab](./src/gitlab) | 17.10.4-ce.0 | -| [GPUStack](./src/gpustack) | v0.5.3 | -| [Grafana](./src/grafana) | 12.1.1 | -| [Halo](./src/halo) | 2.21.9 | -| [Harbor](./src/harbor) | v2.12.0 | -| [HashiCorp Consul](./src/consul) | 1.20.3 | -| [IOPaint](./src/io-paint) | latest | -| [Jenkins](./src/jenkins) | 2.486-lts | -| [JODConverter](./src/jodconverter) | latest | -| [Kibana](./src/kibana) | 8.16.1 | -| [Kodbox](./src/kodbox) | 1.62 | -| [Kong](./src/kong) | 3.8.0 | -| [LibreOffice](./src/libreoffice) | latest | -| [Langfuse](./src/langfuse) | 3.115.0 | -| [LiteLLM](./src/litellm) | main-stable | -| [Logstash](./src/logstash) | 8.16.1 | -| [Milvus Standalone Embed](./src/milvus-standalone-embed) | 2.6.2 | -| [Milvus Standalone](./src/milvus-standalone) | 2.6.2 | -| [MinerU SGALNG](./src/mineru-sgalng) | 2.2.2 | -| [MinerU v2](./src/mineru-v2) | 2.5.3 | -| [MinIO](./src/minio) | RELEASE.2025-09-07T16-13-09Z | -| [MongoDB ReplicaSet](./src/mongodb-replicaset) | 8.0.13 | -| [MongoDB Standalone](./src/mongodb-standalone) | 8.0.13 | -| [MySQL](./src/mysql) | 9.4.0 | -| [n8n](./src/n8n) | 1.114.0 | -| [Nacos](./src/nacos) | v3.1.0 | -| [NebulaGraph](./src/nebulagraph) | v3.8.0 | -| [Neo4j](./src/neo4j) | 5.27.4 | -| [Nginx](./src/nginx) | 1.29.1 | -| [Node Exporter](./src/node-exporter) | v1.8.2 | -| [Odoo](./src/odoo) | 19.0 | -| [Ollama](./src/ollama) | 0.12.0 | -| [Open WebUI](./src/open-webui) | main | -| [OpenCoze](./src/opencoze) | See Docs | -| [OpenCut](./src/opencut) | latest | -| [OpenList](./src/openlist) | latest | -| [PocketBase](./src/pocketbase) | 0.30.0 | -| [Portainer](./src/portainer) | 2.27.3-alpine | -| [Portkey AI 网关](./src/portkey-gateway) | latest | -| [PostgreSQL](./src/postgres) | 17.6 | -| [Prometheus](./src/prometheus) | 3.5.0 | -| [Qdrant](./src/qdrant) | 1.15.4 | -| [RabbitMQ](./src/rabbitmq) | 4.1.4 | -| [Redis Cluster](./src/redis-cluster) | 8.2.1 | -| [Redis](./src/redis) | 8.2.1 | -| [Restate Cluster](./src/restate-cluster) | 1.5.3 | -| [Restate](./src/restate) | 1.5.3 | -| [SearXNG](./src/searxng) | 2025.1.20-1ce14ef99 | -| [Verdaccio](./src/verdaccio) | 6.1.2 | -| [vLLM](./src/vllm) | v0.8.0 | -| [ZooKeeper](./src/zookeeper) | 3.9.3 | +| 服务 | 版本 | +| ------------------------------------------------------------- | ---------------------------- | +| [Apache APISIX](./src/apisix) | 3.13.0 | +| [Apache Cassandra](./src/cassandra) | 5.0.2 | +| [Apache Flink](./src/flink) | 1.20.0 | +| [Apache HBase](./src/hbase) | 2.6 | +| [Apache HTTP Server](./src/apache) | 2.4.62 | +| [Apache Kafka](./src/kafka) | 7.8.0 | +| [Apache RocketMQ](./src/rocketmq) | 5.3.1 | +| [Bifrost Gateway](./src/bifrost-gateway) | 1.2.15 | +| [Bolt.diy](./src/bolt-diy) | latest | +| [Budibase](./src/budibase) | 3.23.0 | +| [Bytebot](./src/bytebot) | edge | +| [Clash](./src/clash) | 1.18.0 | +| [ClickHouse](./src/clickhouse) | 24.11.1 | +| [Conductor](./src/conductor) | latest | +| [Dify](./src/dify) | 0.18.2 | +| [DNSMasq](./src/dnsmasq) | 2.91 | +| [Dockge](./src/dockge) | 1 | +| [Docker Registry](./src/docker-registry) | 3.0.0 | +| [DuckDB](./src/duckdb) | v1.1.3 | +| [Easy Dataset](./src/easy-dataset) | 1.5.1 | +| [Elasticsearch](./src/elasticsearch) | 8.16.1 | +| [etcd](./src/etcd) | 3.6.0 | +| [Firecrawl](./src/firecrawl) | latest | +| [frpc](./src/frpc) | 0.64.0 | +| [frps](./src/frps) | 0.64.0 | +| [Gitea Runner](./src/gitea-runner) | 0.2.12 | +| [Gitea](./src/gitea) | 1.24.6 | +| [GitLab Runner](./src/gitlab-runner) | 17.10.1 | +| [GitLab](./src/gitlab) | 17.10.4-ce.0 | +| [GPUStack](./src/gpustack) | v0.5.3 | +| [Grafana](./src/grafana) | 12.1.1 | +| [Halo](./src/halo) | 2.21.9 | +| [Harbor](./src/harbor) | v2.12.0 | +| [HashiCorp Consul](./src/consul) | 1.20.3 | +| [IOPaint](./builds/io-paint) | latest | +| [Jenkins](./src/jenkins) | 2.486-lts | +| [JODConverter](./src/jodconverter) | latest | +| [Kestra](./src/kestra) | latest-full | +| [Kibana](./src/kibana) | 8.16.1 | +| [Kodbox](./src/kodbox) | 1.62 | +| [Kong](./src/kong) | 3.8.0 | +| [Langflow](./src/langflow) | latest | +| [Langfuse](./src/langfuse) | 3.115.0 | +| [LibreOffice](./src/libreoffice) | latest | +| [LiteLLM](./src/litellm) | main-stable | +| [Logstash](./src/logstash) | 8.16.1 | +| [MariaDB Galera 集群](./src/mariadb-galera) | 11.7.2 | +| [Milvus Standalone Embed](./src/milvus-standalone-embed) | 2.6.2 | +| [Milvus Standalone](./src/milvus-standalone) | 2.6.2 | +| [Minecraft Bedrock Server](./src/minecraft-bedrock-server) | latest | +| [MinerU SGALNG](./src/mineru-sgalng) | 2.2.2 | +| [MinerU vLLM](./builds/mineru-vllm) | 2.5.4 | +| [MinIO](./src/minio) | RELEASE.2025-09-07T16-13-09Z | +| [MLflow](./src/mlflow) | v2.20.2 | +| [MongoDB ReplicaSet Single](./src/mongodb-replicaset-single) | 8.0.13 | +| [MongoDB ReplicaSet](./src/mongodb-replicaset) | 8.0.13 | +| [MongoDB Standalone](./src/mongodb-standalone) | 8.0.13 | +| [MySQL](./src/mysql) | 9.4.0 | +| [n8n](./src/n8n) | 1.114.0 | +| [Nacos](./src/nacos) | v3.1.0 | +| [NebulaGraph](./src/nebulagraph) | v3.8.0 | +| [Neo4j](./src/neo4j) | 5.27.4 | +| [Nginx](./src/nginx) | 1.29.1 | +| [Node Exporter](./src/node-exporter) | v1.8.2 | +| [OceanBase](./src/oceanbase) | 4.3.3 | +| [Odoo](./src/odoo) | 19.0 | +| [Ollama](./src/ollama) | 0.12.0 | +| [Open WebUI](./src/open-webui) | main | +| [OpenCoze](./src/opencoze) | See Docs | +| [OpenCut](./src/opencut) | latest | +| [OpenList](./src/openlist) | latest | +| [OpenSearch](./src/opensearch) | 2.19.0 | +| [PocketBase](./src/pocketbase) | 0.30.0 | +| [Portainer](./src/portainer) | 2.27.3-alpine | +| [Portkey AI Gateway](./src/portkey-gateway) | latest | +| [PostgreSQL](./src/postgres) | 17.6 | +| [Prometheus](./src/prometheus) | 3.5.0 | +| [PyTorch](./src/pytorch) | 2.6.0 | +| [Qdrant](./src/qdrant) | 1.15.4 | +| [RabbitMQ](./src/rabbitmq) | 4.1.4 | +| [Ray](./src/ray) | 2.42.1 | +| [Redis Cluster](./src/redis-cluster) | 8.2.1 | +| [Redis](./src/redis) | 8.2.1 | +| [Restate Cluster](./src/restate-cluster) | 1.5.3 | +| [Restate](./src/restate) | 1.5.3 | +| [SearXNG](./src/searxng) | 2025.1.20-1ce14ef99 | +| [Stable Diffusion WebUI](./src/stable-diffusion-webui-docker) | latest | +| [Stirling-PDF](./src/stirling-pdf) | latest | +| [Temporal](./src/temporal) | 1.24.2 | +| [TiDB](./src/tidb) | v8.5.0 | +| [TiKV](./src/tikv) | v8.5.0 | +| [Valkey Cluster](./src/valkey-cluster) | 8.0 | +| [Valkey](./src/valkey) | 8.0 | +| [Verdaccio](./src/verdaccio) | 6.1.2 | +| [vLLM](./src/vllm) | v0.8.0 | +| [Windmill](./src/windmill) | main | +| [ZooKeeper](./src/zookeeper) | 3.9.3 | ## MCP 服务器 diff --git a/src/io-paint/.env.example b/builds/io-paint/.env.example similarity index 100% rename from src/io-paint/.env.example rename to builds/io-paint/.env.example diff --git a/src/io-paint/.gitignore b/builds/io-paint/.gitignore similarity index 100% rename from src/io-paint/.gitignore rename to builds/io-paint/.gitignore diff --git a/src/io-paint/Dockerfile b/builds/io-paint/Dockerfile similarity index 100% rename from src/io-paint/Dockerfile rename to builds/io-paint/Dockerfile diff --git a/src/io-paint/README.md b/builds/io-paint/README.md similarity index 100% rename from src/io-paint/README.md rename to builds/io-paint/README.md diff --git a/src/io-paint/README.zh.md b/builds/io-paint/README.zh.md similarity index 100% rename from src/io-paint/README.zh.md rename to builds/io-paint/README.zh.md diff --git a/src/io-paint/docker-compose.yaml b/builds/io-paint/docker-compose.yaml similarity index 100% rename from src/io-paint/docker-compose.yaml rename to builds/io-paint/docker-compose.yaml diff --git a/src/mineru-vllm/.env.example b/builds/mineru-vllm/.env.example similarity index 100% rename from src/mineru-vllm/.env.example rename to builds/mineru-vllm/.env.example diff --git a/src/mineru-vllm/Dockerfile b/builds/mineru-vllm/Dockerfile similarity index 100% rename from src/mineru-vllm/Dockerfile rename to builds/mineru-vllm/Dockerfile diff --git a/src/mineru-vllm/README.md b/builds/mineru-vllm/README.md similarity index 100% rename from src/mineru-vllm/README.md rename to builds/mineru-vllm/README.md diff --git a/src/mineru-vllm/README.zh.md b/builds/mineru-vllm/README.zh.md similarity index 100% rename from src/mineru-vllm/README.zh.md rename to builds/mineru-vllm/README.zh.md diff --git a/src/mineru-vllm/docker-compose.yaml b/builds/mineru-vllm/docker-compose.yaml similarity index 100% rename from src/mineru-vllm/docker-compose.yaml rename to builds/mineru-vllm/docker-compose.yaml diff --git a/src/bytebot/README.zh.md b/src/bytebot/README.zh.md new file mode 100644 index 0000000..5a74e8b --- /dev/null +++ b/src/bytebot/README.zh.md @@ -0,0 +1,78 @@ +# Bytebot + +[English](./README.md) | [中文](./README.zh.md) + +此服务用于部署 Bytebot,一个开源的 AI 桌面代理,可自动化执行计算机任务。 + +## 服务 + +- `bytebot-desktop`:容器化的 Linux 桌面环境 +- `bytebot-agent`:用于任务处理的 AI 代理 +- `bytebot-ui`:任务管理的 Web 界面 +- `bytebot-db`:PostgreSQL 数据库 + +## 环境变量 + +| 变量名 | 说明 | 默认值 | +| ------------------------------- | ---------------------------- | ------------- | +| `BYTEBOT_VERSION` | Bytebot 镜像版本 | `edge` | +| `POSTGRES_VERSION` | PostgreSQL 版本 | `17-alpine` | +| `POSTGRES_USER` | PostgreSQL 用户名 | `bytebot` | +| `POSTGRES_PASSWORD` | PostgreSQL 密码 | `bytebotpass` | +| `POSTGRES_DB` | PostgreSQL 数据库名称 | `bytebot` | +| `ANTHROPIC_API_KEY` | Anthropic API 密钥(Claude) | `""` | +| `OPENAI_API_KEY` | OpenAI API 密钥(GPT) | `""` | +| `GEMINI_API_KEY` | Google Gemini API 密钥 | `""` | +| `BYTEBOT_DESKTOP_PORT_OVERRIDE` | 桌面端口覆盖 | `9990` | +| `BYTEBOT_AGENT_PORT_OVERRIDE` | 代理端口覆盖 | `9991` | +| `BYTEBOT_UI_PORT_OVERRIDE` | UI 端口覆盖 | `9992` | + +至少需要一个 AI API 密钥。 + +## 卷 + +- `bytebot_db_data`:PostgreSQL 数据 + +## 使用方法 + +### 启动 Bytebot + +```bash +docker compose up -d +``` + +### 访问 + +- Web UI: +- Agent API: +- 桌面 VNC: + +### 创建任务 + +1. 打开 +2. 使用自然语言描述创建新任务 +3. 在桌面环境中观察代理工作 + +## 功能特性 + +- 自然语言任务自动化 +- 带 VNC 的可视化桌面环境 +- 支持多种 AI 模型(Claude、GPT、Gemini) +- 基于 Web 的任务管理界面 + +## 注意事项 + +- 需要至少一个 AI API 密钥才能正常工作 +- 桌面环境使用共享内存(2GB) +- 首次启动可能需要几分钟 +- 适合开发和测试使用 + +## 安全性 + +- 生产环境中请更改默认数据库密码 +- 妥善保管 AI API 密钥 +- 考虑使用环境文件而不是命令行参数传递敏感信息 + +## 许可证 + +Bytebot 采用 Apache License 2.0 许可。详情请参见 [Bytebot GitHub](https://github.com/bytebot-ai/bytebot)。 diff --git a/src/cassandra/README.zh.md b/src/cassandra/README.zh.md new file mode 100644 index 0000000..a6c692b --- /dev/null +++ b/src/cassandra/README.zh.md @@ -0,0 +1,90 @@ +# Apache Cassandra + +[English](./README.md) | [中文](./README.zh.md) + +此服务用于部署 Apache Cassandra,一个高度可扩展的 NoSQL 分布式数据库。 + +## 服务 + +- `cassandra`:Cassandra 数据库服务 + +## 环境变量 + +| 变量名 | 说明 | 默认值 | +| -------------------------------- | -------------------------------------- | ----------------------------- | +| `CASSANDRA_VERSION` | Cassandra 镜像版本 | `5.0.2` | +| `CASSANDRA_CQL_PORT_OVERRIDE` | CQL 主机端口映射(映射到端口 9042) | `9042` | +| `CASSANDRA_THRIFT_PORT_OVERRIDE` | Thrift 主机端口映射(映射到端口 9160) | `9160` | +| `CASSANDRA_CLUSTER_NAME` | Cassandra 集群名称 | `Test Cluster` | +| `CASSANDRA_DC` | 数据中心名称 | `datacenter1` | +| `CASSANDRA_RACK` | 机架名称 | `rack1` | +| `CASSANDRA_ENDPOINT_SNITCH` | 端点嗅探器配置 | `GossipingPropertyFileSnitch` | +| `CASSANDRA_NUM_TOKENS` | 每个节点的令牌数 | `256` | +| `CASSANDRA_SEEDS` | 用于集群发现的种子节点 | `cassandra` | +| `CASSANDRA_START_RPC` | 启用 Thrift RPC 接口 | `false` | +| `MAX_HEAP_SIZE` | JVM 最大堆大小 | `1G` | +| `HEAP_NEWSIZE` | JVM 新生代堆大小 | `100M` | + +请根据实际需求修改 `.env` 文件。 + +## 卷 + +- `cassandra_data`:Cassandra 数据目录 +- `cassandra_logs`:Cassandra 日志目录 +- `./cassandra.yaml`:可选的自定义 Cassandra 配置文件 + +## 使用方法 + +1. 启动服务: + + ```bash + docker compose up -d + ``` + +2. 等待 Cassandra 就绪(查看日志): + + ```bash + docker compose logs -f cassandra + ``` + +3. 使用 cqlsh 连接: + + ```bash + docker exec -it cassandra cqlsh + ``` + +## 基本 CQL 命令 + +```sql +-- 创建键空间 +CREATE KEYSPACE test_keyspace +WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}; + +-- 使用键空间 +USE test_keyspace; + +-- 创建表 +CREATE TABLE users ( + id UUID PRIMARY KEY, + name TEXT, + email TEXT +); + +-- 插入数据 +INSERT INTO users (id, name, email) +VALUES (uuid(), 'John Doe', 'john@example.com'); + +-- 查询数据 +SELECT * FROM users; +``` + +## 健康检查 + +该服务包含健康检查,用于验证 Cassandra 是否响应 CQL 查询。 + +## 安全提示 + +- 此配置用于开发/测试目的 +- 生产环境请启用身份验证和 SSL/TLS +- 配置适当的网络安全和防火墙规则 +- 定期备份数据并更新 Cassandra 版本 diff --git a/src/elasticsearch/README.zh.md b/src/elasticsearch/README.zh.md new file mode 100644 index 0000000..26c594a --- /dev/null +++ b/src/elasticsearch/README.zh.md @@ -0,0 +1,92 @@ +# Elasticsearch + +[English](./README.md) | [中文](./README.zh.md) + +此服务用于部署 Elasticsearch,一个分布式搜索和分析引擎。 + +## 服务 + +- `elasticsearch`:Elasticsearch 服务 + +## 环境变量 + +| 变量名 | 说明 | 默认值 | +| --------------------------------------- | ------------------------------------- | ---------------- | +| `ELASTICSEARCH_VERSION` | Elasticsearch 镜像版本 | `8.16.1` | +| `ELASTICSEARCH_HTTP_PORT_OVERRIDE` | HTTP 主机端口映射(映射到端口 9200) | `9200` | +| `ELASTICSEARCH_TRANSPORT_PORT_OVERRIDE` | 传输层主机端口映射(映射到端口 9300) | `9300` | +| `ELASTICSEARCH_CLUSTER_NAME` | Elasticsearch 集群名称 | `docker-cluster` | +| `ELASTICSEARCH_DISCOVERY_TYPE` | 单节点设置的发现类型 | `single-node` | +| `ELASTICSEARCH_SECURITY_ENABLED` | 启用 X-Pack 安全功能 | `false` | +| `ELASTICSEARCH_SSL_ENABLED` | 启用 SSL/TLS | `false` | +| `ELASTICSEARCH_HEAP_SIZE` | JVM 堆大小 | `1g` | + +请根据实际需求修改 `.env` 文件。 + +## 卷 + +- `elasticsearch_data`:Elasticsearch 数据目录 +- `elasticsearch_logs`:Elasticsearch 日志目录 +- `./elasticsearch.yml`:可选的自定义 Elasticsearch 配置文件 + +## 使用方法 + +1. 启动服务: + + ```bash + docker compose up -d + ``` + +2. 等待 Elasticsearch 就绪: + + ```bash + docker compose logs -f elasticsearch + ``` + +3. 测试连接: + + ```bash + curl http://localhost:9200 + ``` + +## 基本操作 + +```bash +# 检查集群健康状态 +curl http://localhost:9200/_cluster/health + +# 列出所有索引 +curl http://localhost:9200/_cat/indices?v + +# 创建索引 +curl -X PUT "localhost:9200/my-index" + +# 索引文档 +curl -X POST "localhost:9200/my-index/_doc" \ + -H "Content-Type: application/json" \ + -d '{"name": "John Doe", "age": 30}' + +# 搜索文档 +curl -X GET "localhost:9200/my-index/_search" \ + -H "Content-Type: application/json" \ + -d '{"query": {"match_all": {}}}' +``` + +## 内存配置 + +Elasticsearch 需要足够的内存才能有效运行。默认配置分配 1GB 堆内存。对于生产环境,请考虑: + +- 将 `ELASTICSEARCH_HEAP_SIZE` 设置为可用 RAM 的 50%(但不超过 31GB) +- 确保主机至少有 2GB 可用 RAM +- 适当配置交换内存 + +## 健康检查 + +该服务包含健康检查,用于验证 Elasticsearch 集群健康状态。 + +## 安全提示 + +- 此配置禁用了安全功能以便于开发 +- 生产环境请启用 X-Pack 安全、SSL/TLS 和身份验证 +- 配置适当的网络安全和防火墙规则 +- 定期备份索引并更新 Elasticsearch 版本 diff --git a/src/jenkins/README.zh.md b/src/jenkins/README.zh.md new file mode 100644 index 0000000..b3cd92b --- /dev/null +++ b/src/jenkins/README.zh.md @@ -0,0 +1,76 @@ +# Jenkins + +[English](./README.md) | [中文](./README.zh.md) + +此服务用于部署 Jenkins,一个用于 CI/CD 流水线的开源自动化服务器。 + +## 服务 + +- `jenkins`:Jenkins 自动化服务器 + +## 环境变量 + +| 变量名 | 说明 | 默认值 | +| ----------------------------- | ------------------------------------ | ----------------------------------------------- | +| `JENKINS_VERSION` | Jenkins 镜像版本 | `2.486-lts-jdk17` | +| `JENKINS_HTTP_PORT_OVERRIDE` | HTTP 主机端口映射(映射到端口 8080) | `8080` | +| `JENKINS_AGENT_PORT_OVERRIDE` | 代理主机端口映射(映射到端口 50000) | `50000` | +| `JENKINS_OPTS` | 额外的 Jenkins 选项 | `--httpPort=8080` | +| `JAVA_OPTS` | Java JVM 选项 | `-Djenkins.install.runSetupWizard=false -Xmx2g` | +| `CASC_JENKINS_CONFIG` | 配置即代码目录 | `/var/jenkins_home/casc_configs` | +| `JENKINS_USER_ID` | Jenkins 进程的用户 ID | `1000` | +| `JENKINS_GROUP_ID` | Jenkins 进程的组 ID | `1000` | + +请根据实际需求修改 `.env` 文件。 + +## 卷 + +- `jenkins_home`:用于存储 Jenkins 数据、配置和工作空间的卷 +- `/var/run/docker.sock`:Docker 套接字(只读),用于 Docker-in-Docker 功能 +- `./jenkins.yaml`:可选的配置即代码文件 + +## 初始设置 + +1. 启动服务: + + ```bash + docker compose up -d + ``` + +2. 获取初始管理员密码: + + ```bash + docker exec jenkins cat /var/jenkins_home/secrets/initialAdminPassword + ``` + +3. 访问 `http://localhost:8080` 并完成设置向导。 + +## 配置即代码 + +Jenkins 可以使用配置即代码(JCasC)进行配置。创建一个 `jenkins.yaml` 文件并将其挂载到 `/var/jenkins_home/casc_configs/jenkins.yaml`。 + +示例配置: + +```yaml +jenkins: + systemMessage: "Jenkins configured automatically by Jenkins Configuration as Code plugin" + + securityRealm: + local: + allowsSignup: false + users: + - id: admin + password: admin123 + + authorizationStrategy: + loggedInUsersCanDoAnything: + allowAnonymousRead: false +``` + +## 安全提示 + +- 设置完成后立即更改默认管理员密码 +- 生产环境部署请考虑使用 HTTPS +- 定期更新 Jenkins 及其插件以获取安全补丁 +- 使用适当的身份验证和授权策略 +- 限制对 Jenkins Web 界面的访问 diff --git a/src/kafka/README.zh.md b/src/kafka/README.zh.md new file mode 100644 index 0000000..ea60ae8 --- /dev/null +++ b/src/kafka/README.zh.md @@ -0,0 +1,93 @@ +# Apache Kafka + +[English](./README.md) | [中文](./README.zh.md) + +此服务用于部署 Apache Kafka,一个分布式流处理平台,同时包含 Zookeeper 和可选的 Kafka UI。 + +## 服务 + +- `zookeeper`:用于 Kafka 协调的 Zookeeper 服务 +- `kafka`:Kafka 代理服务 +- `kafka-ui`:可选的 Kafka 管理 Web UI(配置文件:`ui`) + +## 环境变量 + +| 变量名 | 说明 | 默认值 | +| ---------------------------------- | ----------------------------------------- | --------------- | +| `KAFKA_VERSION` | Kafka 镜像版本 | `7.8.0` | +| `KAFKA_UI_VERSION` | Kafka UI 镜像版本 | `latest` | +| `ZOOKEEPER_CLIENT_PORT_OVERRIDE` | Zookeeper 主机端口映射(映射到端口 2181) | `2181` | +| `KAFKA_BROKER_PORT_OVERRIDE` | Kafka 主机端口映射(映射到端口 9092) | `9092` | +| `KAFKA_JMX_PORT_OVERRIDE` | JMX 主机端口映射(映射到端口 9999) | `9999` | +| `KAFKA_UI_PORT_OVERRIDE` | Kafka UI 主机端口映射(映射到端口 8080) | `8080` | +| `KAFKA_NUM_PARTITIONS` | 自动创建主题的默认分区数 | `3` | +| `KAFKA_DEFAULT_REPLICATION_FACTOR` | 默认副本因子 | `1` | +| `KAFKA_AUTO_CREATE_TOPICS_ENABLE` | 启用自动创建主题 | `true` | +| `KAFKA_DELETE_TOPIC_ENABLE` | 启用主题删除 | `true` | +| `KAFKA_LOG_RETENTION_HOURS` | 日志保留时间(小时) | `168` | +| `KAFKA_LOG_SEGMENT_BYTES` | 日志段大小(字节) | `1073741824` | +| `KAFKA_HEAP_OPTS` | Kafka 的 JVM 堆选项 | `-Xmx1G -Xms1G` | +| `KAFKA_UI_READONLY` | 将 Kafka UI 设置为只读模式 | `false` | + +请根据实际需求修改 `.env` 文件。 + +## 卷 + +- `zookeeper_data`:Zookeeper 数据目录 +- `zookeeper_log`:Zookeeper 日志目录 +- `kafka_data`:Kafka 数据目录 + +## 使用方法 + +1. 启动 Kafka 和 Zookeeper: + + ```bash + docker compose up -d + ``` + +2. 启动并包含 Kafka UI(可选): + + ```bash + docker compose --profile ui up -d + ``` + +3. 访问 Kafka UI:`http://localhost:8080`(如已启用) + +## 测试 Kafka + +1. 创建主题: + + ```bash + docker exec kafka kafka-topics --create --topic test-topic --bootstrap-server localhost:9092 --partitions 3 --replication-factor 1 + ``` + +2. 列出主题: + + ```bash + docker exec kafka kafka-topics --list --bootstrap-server localhost:9092 + ``` + +3. 生产消息: + + ```bash + docker exec -it kafka kafka-console-producer --topic test-topic --bootstrap-server localhost:9092 + ``` + +4. 消费消息: + + ```bash + docker exec -it kafka kafka-console-consumer --topic test-topic --from-beginning --bootstrap-server localhost:9092 + ``` + +## 配置 + +- Kafka 默认配置为单节点部署 +- 生产环境请考虑调整副本因子和其他设置 +- 可通过环境变量添加自定义 Kafka 配置 + +## 安全提示 + +- 此配置用于开发/测试目的 +- 生产环境请启用 SSL/SASL 身份验证 +- 保护 Zookeeper 通信安全 +- 定期更新 Kafka 版本以获取安全补丁 diff --git a/src/kong/README.md b/src/kong/README.md new file mode 100644 index 0000000..6967eda --- /dev/null +++ b/src/kong/README.md @@ -0,0 +1,107 @@ +# Kong Gateway + +[English](./README.md) | [中文](./README.zh.md) + +This service deploys Kong Gateway, a cloud-native API gateway and service mesh, with PostgreSQL database and optional Konga GUI. + +## Services + +- `kong-db`: PostgreSQL database for Kong +- `kong-migrations`: Database migration service (runs once) +- `kong`: Kong Gateway service +- `kong-gui`: Konga GUI for Kong management (profile: `gui`) + +## Quick Start + +```bash +docker compose up -d +``` + +To enable Konga GUI: + +```bash +docker compose --profile gui up -d +``` + +## Environment Variables + +| Variable Name | Description | Default Value | +| ------------------------------ | ---------------------------------------------------- | ----------------------- | +| `GLOBAL_REGISTRY` | Global registry prefix for all images | `""` | +| `KONG_VERSION` | Kong image version | `3.8.0-alpine` | +| `KONGA_VERSION` | Konga GUI image version | `latest` | +| `POSTGRES_VERSION` | PostgreSQL image version | `16.6-alpine3.21` | +| `KONG_DB_PASSWORD` | PostgreSQL password for Kong database | `kongpass` | +| `KONG_PROXY_PORT_OVERRIDE` | Host port for Kong proxy (maps to port 8000) | `8000` | +| `KONG_PROXY_SSL_PORT_OVERRIDE` | Host port for Kong proxy SSL (maps to port 8443) | `8443` | +| `KONG_ADMIN_API_PORT_OVERRIDE` | Host port for Kong Admin API (maps to port 8001) | `8001` | +| `KONG_ADMIN_SSL_PORT_OVERRIDE` | Host port for Kong Admin API SSL (maps to port 8444) | `8444` | +| `KONG_GUI_PORT_OVERRIDE` | Host port for Konga GUI (maps to port 1337) | `1337` | +| `KONG_ADMIN_LISTEN` | Kong Admin API listen address | `0.0.0.0:8001` | +| `KONG_ADMIN_GUI_URL` | Kong Admin GUI URL | `http://localhost:8002` | +| `TZ` | Timezone | `UTC` | + +Please modify the `.env` file as needed for your use case. + +## Volumes + +- `kong_db_data`: PostgreSQL data for Kong +- `konga_data`: Konga application data (if using GUI profile) + +## Ports + +- `8000`: Kong proxy (HTTP) +- `8443`: Kong proxy (HTTPS) +- `8001`: Kong Admin API (HTTP) +- `8444`: Kong Admin API (HTTPS) +- `1337`: Konga GUI (optional, with `gui` profile) + +## Access Points + +- Kong Proxy: +- Kong Admin API: +- Konga GUI: (if enabled) + +## Basic Usage + +### Add a Service + +```bash +curl -i -X POST http://localhost:8001/services \ + --data name=example-service \ + --data url='http://example.com' +``` + +### Add a Route + +```bash +curl -i -X POST http://localhost:8001/services/example-service/routes \ + --data 'paths[]=/example' +``` + +### Test the Route + +```bash +curl -i http://localhost:8000/example +``` + +## Custom Configuration + +To use a custom Kong configuration file, uncomment the volume mount in `docker-compose.yaml`: + +```yaml +volumes: + - ./kong.conf:/etc/kong/kong.conf:ro +``` + +## Security Notes + +- Change the default database password in production +- Enable authentication for Kong Admin API in production +- Use SSL/TLS for all communications in production +- Regularly update Kong and its plugins for security patches +- Consider using Kong's RBAC and authentication plugins + +## License + +Kong Gateway is licensed under Apache License 2.0. See [Kong GitHub](https://github.com/Kong/kong) for more information. diff --git a/src/kong/README.zh.md b/src/kong/README.zh.md new file mode 100644 index 0000000..4465e0a --- /dev/null +++ b/src/kong/README.zh.md @@ -0,0 +1,107 @@ +# Kong Gateway + +[English](./README.md) | [中文](./README.zh.md) + +此服务用于部署 Kong Gateway,一个云原生 API 网关和服务网格,包含 PostgreSQL 数据库和可选的 Konga GUI。 + +## 服务 + +- `kong-db`:Kong 的 PostgreSQL 数据库 +- `kong-migrations`:数据库迁移服务(运行一次) +- `kong`:Kong 网关服务 +- `kong-gui`:用于 Kong 管理的 Konga GUI(配置文件:`gui`) + +## 快速开始 + +```bash +docker compose up -d +``` + +启用 Konga GUI: + +```bash +docker compose --profile gui up -d +``` + +## 环境变量 + +| 变量名 | 说明 | 默认值 | +| ------------------------------ | ---------------------------------------------- | ----------------------- | +| `GLOBAL_REGISTRY` | 全局镜像仓库前缀 | `""` | +| `KONG_VERSION` | Kong 镜像版本 | `3.8.0-alpine` | +| `KONGA_VERSION` | Konga GUI 镜像版本 | `latest` | +| `POSTGRES_VERSION` | PostgreSQL 镜像版本 | `16.6-alpine3.21` | +| `KONG_DB_PASSWORD` | Kong 数据库的 PostgreSQL 密码 | `kongpass` | +| `KONG_PROXY_PORT_OVERRIDE` | Kong 代理主机端口(映射到端口 8000) | `8000` | +| `KONG_PROXY_SSL_PORT_OVERRIDE` | Kong 代理 SSL 主机端口(映射到端口 8443) | `8443` | +| `KONG_ADMIN_API_PORT_OVERRIDE` | Kong Admin API 主机端口(映射到端口 8001) | `8001` | +| `KONG_ADMIN_SSL_PORT_OVERRIDE` | Kong Admin API SSL 主机端口(映射到端口 8444) | `8444` | +| `KONG_GUI_PORT_OVERRIDE` | Konga GUI 主机端口(映射到端口 1337) | `1337` | +| `KONG_ADMIN_LISTEN` | Kong Admin API 监听地址 | `0.0.0.0:8001` | +| `KONG_ADMIN_GUI_URL` | Kong Admin GUI URL | `http://localhost:8002` | +| `TZ` | 时区 | `UTC` | + +请根据实际需求修改 `.env` 文件。 + +## 卷 + +- `kong_db_data`:Kong 的 PostgreSQL 数据 +- `konga_data`:Konga 应用程序数据(使用 GUI 配置文件时) + +## 端口 + +- `8000`:Kong 代理(HTTP) +- `8443`:Kong 代理(HTTPS) +- `8001`:Kong Admin API(HTTP) +- `8444`:Kong Admin API(HTTPS) +- `1337`:Konga GUI(可选,使用 `gui` 配置文件) + +## 访问点 + +- Kong 代理: +- Kong Admin API: +- Konga GUI:(如已启用) + +## 基本使用 + +### 添加服务 + +```bash +curl -i -X POST http://localhost:8001/services \ + --data name=example-service \ + --data url='http://example.com' +``` + +### 添加路由 + +```bash +curl -i -X POST http://localhost:8001/services/example-service/routes \ + --data 'paths[]=/example' +``` + +### 测试路由 + +```bash +curl -i http://localhost:8000/example +``` + +## 自定义配置 + +要使用自定义 Kong 配置文件,请在 `docker-compose.yaml` 中取消注释卷挂载: + +```yaml +volumes: + - ./kong.conf:/etc/kong/kong.conf:ro +``` + +## 安全提示 + +- 生产环境中请更改默认数据库密码 +- 生产环境中为 Kong Admin API 启用身份验证 +- 生产环境中所有通信使用 SSL/TLS +- 定期更新 Kong 及其插件以获取安全补丁 +- 考虑使用 Kong 的 RBAC 和身份验证插件 + +## 许可证 + +Kong Gateway 采用 Apache License 2.0 许可。详情请参见 [Kong GitHub](https://github.com/Kong/kong)。 diff --git a/src/nacos/README.md b/src/nacos/README.md new file mode 100644 index 0000000..98192ee --- /dev/null +++ b/src/nacos/README.md @@ -0,0 +1,105 @@ +# Nacos + +[English](./README.md) | [中文](./README.zh.md) + +This service deploys Nacos, a dynamic service discovery, configuration management, and service management platform. + +## Services + +- `nacos`: Nacos server in standalone mode + +## Quick Start + +```bash +docker compose up -d +``` + +## Environment Variables + +| Variable Name | Description | Default Value | +| ---------------------------- | ---------------------------------------- | ----------------------------------------------------------------------- | +| `GLOBAL_REGISTRY` | Global registry prefix for all images | `""` | +| `NACOS_VERSION` | Nacos image version | `v3.1.0-slim` | +| `NACOS_HTTP_PORT_OVERRIDE` | Host port for HTTP (maps to port 8848) | `8848` | +| `NACOS_GRPC_PORT_OVERRIDE` | Host port for gRPC (maps to port 9848) | `9848` | +| `NACOS_GRPC_PORT2_OVERRIDE` | Host port for gRPC 2 (maps to port 9849) | `9849` | +| `NACOS_MODE` | Nacos mode (standalone/cluster) | `standalone` | +| `NACOS_AUTH_ENABLE` | Enable authentication | `true` | +| `NACOS_AUTH_TOKEN` | Authentication token (32+ chars) | `SecretKey012345678901234567890123456789012345678901234567890123456789` | +| `NACOS_AUTH_IDENTITY_KEY` | Identity key for authentication | `serverIdentity` | +| `NACOS_AUTH_IDENTITY_VALUE` | Identity value for authentication | `security` | +| `SPRING_DATASOURCE_PLATFORM` | Database platform (empty for embedded) | `""` | +| `JVM_XMS` | JVM initial heap size | `512m` | +| `JVM_XMX` | JVM maximum heap size | `512m` | +| `JVM_XMN` | JVM young generation heap size | `256m` | +| `TZ` | Timezone | `UTC` | + +Please modify the `.env` file as needed for your use case. + +## Volumes + +- `nacos_logs`: Nacos log directory + +## Ports + +- `8848`: Nacos HTTP API and Console +- `9848`: Nacos gRPC port (for client-server communication) +- `9849`: Nacos gRPC port 2 (for server-server communication in cluster mode) + +## Access Points + +- Nacos Console: +- Default credentials: `nacos` / `nacos` + +## Basic Usage + +### Register a Service + +```bash +curl -X POST 'http://localhost:8848/nacos/v1/ns/instance' \ + -d 'serviceName=example-service&ip=127.0.0.1&port=8080' +``` + +### Discover Services + +```bash +curl 'http://localhost:8848/nacos/v1/ns/instance/list?serviceName=example-service' +``` + +### Publish Configuration + +```bash +curl -X POST 'http://localhost:8848/nacos/v1/cs/configs' \ + -d 'dataId=example.properties&group=DEFAULT_GROUP&content=key=value' +``` + +### Get Configuration + +```bash +curl 'http://localhost:8848/nacos/v1/cs/configs?dataId=example.properties&group=DEFAULT_GROUP' +``` + +## External Database (Optional) + +For production use with external MySQL database, set these environment variables: + +```env +SPRING_DATASOURCE_PLATFORM=mysql +MYSQL_SERVICE_HOST=mysql-host +MYSQL_SERVICE_PORT=3306 +MYSQL_SERVICE_DB_NAME=nacos +MYSQL_SERVICE_USER=nacos +MYSQL_SERVICE_PASSWORD=nacos +``` + +## Security Notes + +- Change default credentials immediately after first login +- Use strong authentication token (32+ characters) +- For production, use external MySQL database instead of embedded Derby +- Enable HTTPS for production deployments +- Regularly update Nacos version for security patches + +## License + +Nacos is licensed under Apache License 2.0. See [Nacos GitHub](https://github.com/alibaba/nacos) for more information. diff --git a/src/nacos/README.zh.md b/src/nacos/README.zh.md new file mode 100644 index 0000000..0428738 --- /dev/null +++ b/src/nacos/README.zh.md @@ -0,0 +1,105 @@ +# Nacos + +[English](./README.md) | [中文](./README.zh.md) + +此服务用于部署 Nacos,一个动态服务发现、配置管理和服务管理平台。 + +## 服务 + +- `nacos`:独立模式的 Nacos 服务器 + +## 快速开始 + +```bash +docker compose up -d +``` + +## 环境变量 + +| 变量名 | 说明 | 默认值 | +| ---------------------------- | ---------------------------------- | ----------------------------------------------------------------------- | +| `GLOBAL_REGISTRY` | 全局镜像仓库前缀 | `""` | +| `NACOS_VERSION` | Nacos 镜像版本 | `v3.1.0-slim` | +| `NACOS_HTTP_PORT_OVERRIDE` | HTTP 主机端口(映射到端口 8848) | `8848` | +| `NACOS_GRPC_PORT_OVERRIDE` | gRPC 主机端口(映射到端口 9848) | `9848` | +| `NACOS_GRPC_PORT2_OVERRIDE` | gRPC 2 主机端口(映射到端口 9849) | `9849` | +| `NACOS_MODE` | Nacos 模式(standalone/cluster) | `standalone` | +| `NACOS_AUTH_ENABLE` | 启用身份验证 | `true` | +| `NACOS_AUTH_TOKEN` | 身份验证令牌(32+ 字符) | `SecretKey012345678901234567890123456789012345678901234567890123456789` | +| `NACOS_AUTH_IDENTITY_KEY` | 身份验证的标识键 | `serverIdentity` | +| `NACOS_AUTH_IDENTITY_VALUE` | 身份验证的标识值 | `security` | +| `SPRING_DATASOURCE_PLATFORM` | 数据库平台(留空使用嵌入式数据库) | `""` | +| `JVM_XMS` | JVM 初始堆大小 | `512m` | +| `JVM_XMX` | JVM 最大堆大小 | `512m` | +| `JVM_XMN` | JVM 年轻代堆大小 | `256m` | +| `TZ` | 时区 | `UTC` | + +请根据实际需求修改 `.env` 文件。 + +## 卷 + +- `nacos_logs`:Nacos 日志目录 + +## 端口 + +- `8848`:Nacos HTTP API 和控制台 +- `9848`:Nacos gRPC 端口(用于客户端-服务器通信) +- `9849`:Nacos gRPC 端口 2(用于集群模式下的服务器-服务器通信) + +## 访问点 + +- Nacos 控制台: +- 默认凭据:`nacos` / `nacos` + +## 基本使用 + +### 注册服务 + +```bash +curl -X POST 'http://localhost:8848/nacos/v1/ns/instance' \ + -d 'serviceName=example-service&ip=127.0.0.1&port=8080' +``` + +### 发现服务 + +```bash +curl 'http://localhost:8848/nacos/v1/ns/instance/list?serviceName=example-service' +``` + +### 发布配置 + +```bash +curl -X POST 'http://localhost:8848/nacos/v1/cs/configs' \ + -d 'dataId=example.properties&group=DEFAULT_GROUP&content=key=value' +``` + +### 获取配置 + +```bash +curl 'http://localhost:8848/nacos/v1/cs/configs?dataId=example.properties&group=DEFAULT_GROUP' +``` + +## 外部数据库(可选) + +生产环境中使用外部 MySQL 数据库时,请设置以下环境变量: + +```env +SPRING_DATASOURCE_PLATFORM=mysql +MYSQL_SERVICE_HOST=mysql-host +MYSQL_SERVICE_PORT=3306 +MYSQL_SERVICE_DB_NAME=nacos +MYSQL_SERVICE_USER=nacos +MYSQL_SERVICE_PASSWORD=nacos +``` + +## 安全提示 + +- 首次登录后立即更改默认凭据 +- 使用强身份验证令牌(32+ 字符) +- 生产环境中使用外部 MySQL 数据库而非嵌入式 Derby +- 生产环境中启用 HTTPS +- 定期更新 Nacos 版本以获取安全补丁 + +## 许可证 + +Nacos 采用 Apache License 2.0 许可。详情请参见 [Nacos GitHub](https://github.com/alibaba/nacos)。 diff --git a/src/nebulagraph/README.zh.md b/src/nebulagraph/README.zh.md new file mode 100644 index 0000000..e5694f7 --- /dev/null +++ b/src/nebulagraph/README.zh.md @@ -0,0 +1,53 @@ +# NebulaGraph + +[English](./README.md) | [中文](./README.zh.md) + +此服务用于部署 NebulaGraph,一个分布式、快速的开源图数据库。 + +## 服务 + +- `metad`:用于集群管理的元数据服务 +- `storaged`:用于数据持久化的存储服务 +- `graphd`:用于客户端连接的查询服务 + +## 环境变量 + +| 变量名 | 说明 | 默认值 | +| ----------------------------- | ---------------- | -------- | +| `NEBULA_VERSION` | NebulaGraph 版本 | `v3.8.0` | +| `NEBULA_GRAPHD_PORT_OVERRIDE` | GraphD 端口覆盖 | `9669` | + +## 卷 + +- `nebula_meta_data`:元数据服务数据 +- `nebula_storage_data`:存储服务数据 +- `nebula_*_logs`:各服务的日志文件 + +## 使用方法 + +### 启动 NebulaGraph + +```bash +docker compose up -d +``` + +### 连接到 NebulaGraph + +```bash +# 使用控制台 +docker run --rm -it --network host vesoft/nebula-console:v3.8.0 -addr 127.0.0.1 -port 9669 -u root -p nebula +``` + +## 访问 + +- GraphD: + +## 注意事项 + +- 默认凭据:root/nebula +- 启动后等待 20-30 秒以使服务就绪 +- 适合开发和测试使用 + +## 许可证 + +NebulaGraph 采用 Apache License 2.0 许可。 diff --git a/src/neo4j/README.md b/src/neo4j/README.md new file mode 100644 index 0000000..082b241 --- /dev/null +++ b/src/neo4j/README.md @@ -0,0 +1,98 @@ +# Neo4j + +[English](./README.md) | [中文](./README.zh.md) + +This service deploys Neo4j, a leading graph database management system. + +## Services + +- `neo4j`: Neo4j Community Edition database + +## Quick Start + +```bash +docker compose up -d +``` + +## Environment Variables + +| Variable Name | Description | Default Value | +| -------------------------------- | ------------------------------------- | ------------------ | +| `GLOBAL_REGISTRY` | Global registry prefix for all images | `""` | +| `NEO4J_VERSION` | Neo4j image version | `5.27.4-community` | +| `NEO4J_HTTP_PORT_OVERRIDE` | Host port for HTTP (maps to 7474) | `7474` | +| `NEO4J_BOLT_PORT_OVERRIDE` | Host port for Bolt (maps to 7687) | `7687` | +| `NEO4J_AUTH` | Authentication (format: user/pass) | `neo4j/password` | +| `NEO4J_ACCEPT_LICENSE_AGREEMENT` | Accept license agreement | `yes` | +| `NEO4J_PAGECACHE_SIZE` | Page cache memory size | `512M` | +| `NEO4J_HEAP_INIT_SIZE` | Initial heap size | `512M` | +| `NEO4J_HEAP_MAX_SIZE` | Maximum heap size | `1G` | +| `TZ` | Timezone | `UTC` | + +Please modify the `.env` file as needed for your use case. + +## Volumes + +- `neo4j_data`: Neo4j database data +- `neo4j_logs`: Neo4j log files +- `neo4j_import`: Import directory for bulk data +- `neo4j_plugins`: Neo4j plugins directory + +## Ports + +- `7474`: HTTP (Neo4j Browser) +- `7687`: Bolt protocol + +## Access Points + +- Neo4j Browser: +- Bolt URI: `bolt://localhost:7687` +- Default credentials: `neo4j` / `password` (change via `NEO4J_AUTH`) + +## Basic Usage + +### Using Neo4j Browser + +1. Open +2. Log in with credentials from `NEO4J_AUTH` +3. Run Cypher queries + +### Create Nodes and Relationships + +```cypher +// Create nodes +CREATE (alice:Person {name: 'Alice', age: 30}) +CREATE (bob:Person {name: 'Bob', age: 25}) + +// Create relationship +MATCH (a:Person {name: 'Alice'}), (b:Person {name: 'Bob'}) +CREATE (a)-[:KNOWS]->(b) + +// Query +MATCH (p:Person)-[:KNOWS]->(friend) +RETURN p.name, friend.name +``` + +## Memory Configuration + +For production environments, adjust memory settings based on your workload: + +- `NEO4J_PAGECACHE_SIZE`: Should be large enough to cache graph data (recommend 50% of RAM) +- `NEO4J_HEAP_INIT_SIZE` / `NEO4J_HEAP_MAX_SIZE`: JVM heap for query processing + +## Importing Data + +Place CSV or other data files in the mounted import directory, then use `LOAD CSV` or `neo4j-admin import`. + +## Security Notes + +- Change default password immediately after first login +- Use strong passwords in production +- Enable SSL/TLS for production deployments +- Restrict network access to Neo4j ports +- Regularly backup your graph database +- Keep Neo4j updated for security patches + +## License + +Neo4j Community Edition is licensed under GPLv3. For commercial use, consider Neo4j Enterprise Edition. See [Neo4j Licensing](https://neo4j.com/licensing/) for details. diff --git a/src/neo4j/README.zh.md b/src/neo4j/README.zh.md new file mode 100644 index 0000000..25776ab --- /dev/null +++ b/src/neo4j/README.zh.md @@ -0,0 +1,98 @@ +# Neo4j + +[English](./README.md) | [中文](./README.zh.md) + +此服务用于部署 Neo4j,领先的图数据库管理系统。 + +## 服务 + +- `neo4j`:Neo4j 社区版数据库 + +## 快速开始 + +```bash +docker compose up -d +``` + +## 环境变量 + +| 变量名 | 说明 | 默认值 | +| -------------------------------- | ---------------------------- | ------------------ | +| `GLOBAL_REGISTRY` | 全局镜像仓库前缀 | `""` | +| `NEO4J_VERSION` | Neo4j 镜像版本 | `5.27.4-community` | +| `NEO4J_HTTP_PORT_OVERRIDE` | HTTP 主机端口(映射到 7474) | `7474` | +| `NEO4J_BOLT_PORT_OVERRIDE` | Bolt 主机端口(映射到 7687) | `7687` | +| `NEO4J_AUTH` | 身份验证(格式:user/pass) | `neo4j/password` | +| `NEO4J_ACCEPT_LICENSE_AGREEMENT` | 接受许可协议 | `yes` | +| `NEO4J_PAGECACHE_SIZE` | 页缓存内存大小 | `512M` | +| `NEO4J_HEAP_INIT_SIZE` | 初始堆大小 | `512M` | +| `NEO4J_HEAP_MAX_SIZE` | 最大堆大小 | `1G` | +| `TZ` | 时区 | `UTC` | + +请根据实际需求修改 `.env` 文件。 + +## 卷 + +- `neo4j_data`:Neo4j 数据库数据 +- `neo4j_logs`:Neo4j 日志文件 +- `neo4j_import`:批量数据导入目录 +- `neo4j_plugins`:Neo4j 插件目录 + +## 端口 + +- `7474`:HTTP(Neo4j 浏览器) +- `7687`:Bolt 协议 + +## 访问点 + +- Neo4j 浏览器: +- Bolt URI:`bolt://localhost:7687` +- 默认凭据:`neo4j` / `password`(通过 `NEO4J_AUTH` 修改) + +## 基本使用 + +### 使用 Neo4j 浏览器 + +1. 打开 +2. 使用 `NEO4J_AUTH` 中的凭据登录 +3. 运行 Cypher 查询 + +### 创建节点和关系 + +```cypher +// 创建节点 +CREATE (alice:Person {name: 'Alice', age: 30}) +CREATE (bob:Person {name: 'Bob', age: 25}) + +// 创建关系 +MATCH (a:Person {name: 'Alice'}), (b:Person {name: 'Bob'}) +CREATE (a)-[:KNOWS]->(b) + +// 查询 +MATCH (p:Person)-[:KNOWS]->(friend) +RETURN p.name, friend.name +``` + +## 内存配置 + +生产环境中,根据工作负载调整内存设置: + +- `NEO4J_PAGECACHE_SIZE`:应足够大以缓存图数据(建议使用 RAM 的 50%) +- `NEO4J_HEAP_INIT_SIZE` / `NEO4J_HEAP_MAX_SIZE`:用于查询处理的 JVM 堆 + +## 导入数据 + +将 CSV 或其他数据文件放在挂载的导入目录中,然后使用 `LOAD CSV` 或 `neo4j-admin import`。 + +## 安全提示 + +- 首次登录后立即更改默认密码 +- 生产环境中使用强密码 +- 生产环境中启用 SSL/TLS +- 限制对 Neo4j 端口的网络访问 +- 定期备份图数据库 +- 保持 Neo4j 更新以获取安全补丁 + +## 许可证 + +Neo4j 社区版采用 GPLv3 许可。商业使用请考虑 Neo4j 企业版。详情请参见 [Neo4j Licensing](https://neo4j.com/licensing/)。 diff --git a/src/node-exporter/README.zh.md b/src/node-exporter/README.zh.md new file mode 100644 index 0000000..ffa13ee --- /dev/null +++ b/src/node-exporter/README.zh.md @@ -0,0 +1,81 @@ +# Node Exporter + +[English](./README.md) | [中文](./README.zh.md) + +此服务用于部署 Prometheus Node Exporter,用于暴露 *NIX 内核的硬件和操作系统指标。 + +## 服务 + +- `node-exporter`:Prometheus Node Exporter 服务 + +## 环境变量 + +| 变量名 | 说明 | 默认值 | +| ----------------------------- | ------------------ | -------- | +| `NODE_EXPORTER_VERSION` | Node Exporter 版本 | `v1.8.2` | +| `NODE_EXPORTER_PORT_OVERRIDE` | 主机端口映射 | `9100` | + +请根据实际需求修改 `.env` 文件。 + +## 使用方法 + +### 启动 Node Exporter + +```bash +docker compose up -d +``` + +### 访问指标 + +- 指标端点: + +### 配置 Prometheus + +在 Prometheus 配置中添加此抓取配置: + +```yaml +scrape_configs: + - job_name: 'node' + static_configs: + - targets: ['localhost:9100'] +``` + +## 收集的指标 + +Node Exporter 收集各种系统指标: + +- **CPU**:使用率、频率、温度 +- **内存**:使用量、可用量、缓存 +- **磁盘**:I/O、空间使用 +- **网络**:流量、错误 +- **文件系统**:挂载点、使用情况 +- **负载**:系统负载平均值 +- **以及更多** + +## 网络模式 + +为了获得更准确的指标,您可以使用主机网络模式运行 Node Exporter。在 `docker-compose.yaml` 中取消注释: + +```yaml +network_mode: host +``` + +注意:使用主机网络模式时,不需要端口映射。 + +## 注意事项 + +- Node Exporter 应在您想要监控的每台主机上运行 +- 该服务需要访问主机文件系统和进程 +- 指标以 Prometheus 格式暴露 +- 默认情况下不提供身份验证 + +## 安全性 + +- 如果 Prometheus 在同一主机上运行,仅绑定到 localhost +- 使用防火墙规则限制对指标端点的访问 +- 生产环境中考虑使用带身份验证的反向代理 +- 监控访问日志以发现可疑活动 + +## 许可证 + +Node Exporter 采用 Apache License 2.0 许可。详情请参见 [Node Exporter GitHub](https://github.com/prometheus/node_exporter)。 diff --git a/src/openlist/README.zh.md b/src/openlist/README.zh.md new file mode 100644 index 0000000..3f6f58b --- /dev/null +++ b/src/openlist/README.zh.md @@ -0,0 +1,53 @@ +# OpenList + +[English](./README.md) | [中文](./README.zh.md) + +此服务用于部署 OpenList,一个支持多种存储的文件列表程序。 + +## 服务 + +- `openlist`:OpenList 服务 + +## 环境变量 + +| 变量名 | 说明 | 默认值 | +| ------------------------ | ------------- | --------------- | +| `OPENLIST_VERSION` | OpenList 版本 | `latest` | +| `PUID` | 用户 ID | `0` | +| `PGID` | 组 ID | `0` | +| `UMASK` | UMASK | `022` | +| `TZ` | 时区 | `Asia/Shanghai` | +| `OPENLIST_PORT_OVERRIDE` | 主机端口映射 | `5244` | + +## 卷 + +- `openlist_data`:数据目录 + +## 使用方法 + +### 启动 OpenList + +```bash +docker compose up -d +``` + +### 访问 + +- Web UI: + +### 初始设置 + +1. 打开 +2. 完成初始设置向导 +3. 配置存储提供商 +4. 开始管理文件 + +## 注意事项 + +- 首次启动需要初始配置 +- 支持多种云存储提供商 +- AList 的社区驱动分支 + +## 许可证 + +OpenList 遵循原始 AList 许可证。详情请参见 [OpenList GitHub](https://github.com/OpenListTeam/OpenList)。 diff --git a/src/redis-cluster/README.zh.md b/src/redis-cluster/README.zh.md new file mode 100644 index 0000000..f37b63e --- /dev/null +++ b/src/redis-cluster/README.zh.md @@ -0,0 +1,120 @@ +# Redis Cluster + +[English](./README.md) | [中文](./README.zh.md) + +此服务用于部署一个包含 6 个节点(3 个主节点 + 3 个从节点)的 Redis 集群。 + +## 服务 + +- `redis-1` 到 `redis-6`:Redis 集群节点 +- `redis-cluster-init`:初始化容器(一次性设置) + +## 环境变量 + +| 变量名 | 说明 | 默认值 | +| --------------- | -------------- | -------------- | +| `REDIS_VERSION` | Redis 镜像版本 | `8.2.1-alpine` | + +请根据实际需求修改 `.env` 文件。 + +## 卷 + +- `redis_1_data` 到 `redis_6_data`:每个 Redis 节点的数据持久化 + +## 使用方法 + +### 启动 Redis 集群 + +```bash +# 启动所有 Redis 节点 +docker compose up -d + +# 初始化集群(仅首次) +docker compose --profile init up redis-cluster-init + +# 验证集群状态 +docker exec redis-1 redis-cli --cluster check redis-1:6379 +``` + +### 连接到集群 + +```bash +# 使用 redis-cli 连接 +docker exec -it redis-1 redis-cli -c + +# 测试集群 +127.0.0.1:6379> CLUSTER INFO +127.0.0.1:6379> SET mykey "Hello" +127.0.0.1:6379> GET mykey +``` + +### 从应用程序访问 + +在应用程序中使用集群模式连接: + +```python +# Python 示例 +from redis.cluster import RedisCluster + +startup_nodes = [ + {"host": "localhost", "port": "7000"}, + {"host": "localhost", "port": "7001"}, + {"host": "localhost", "port": "7002"}, +] +rc = RedisCluster(startup_nodes=startup_nodes, decode_responses=True) +rc.set("foo", "bar") +print(rc.get("foo")) +``` + +## 端口 + +- 7000-7005:映射到每个 Redis 节点的 6379 端口 + +## 集群信息 + +- **主节点**:3 个节点(redis-1、redis-2、redis-3) +- **从节点**:3 个节点(redis-4、redis-5、redis-6) +- **总槽数**:16384(分布在主节点间) + +## 添加新节点 + +向集群添加更多节点: + +1. 在 `docker-compose.yaml` 中添加新服务 +2. 启动新节点 +3. 添加到集群: + +```bash +docker exec redis-1 redis-cli --cluster add-node new-node-ip:6379 redis-1:6379 +docker exec redis-1 redis-cli --cluster reshard redis-1:6379 +``` + +## 移除节点 + +```bash +# 移除节点 +docker exec redis-1 redis-cli --cluster del-node redis-1:6379 +``` + +## 注意事项 + +- 集群初始化只需执行一次 +- 每个节点存储数据的子集 +- Redis 集群自动处理故障转移 +- 生产环境至少需要 3 个主节点 +- 数据自动复制到从节点 + +## 安全性 + +- 生产环境添加密码验证: + +```bash +command: redis-server --requirepass yourpassword --cluster-enabled yes ... +``` + +- 使用防火墙规则限制访问 +- 生产环境中考虑使用 TLS 进行节点间通信 + +## 许可证 + +Redis 采用 Redis Source Available License 2.0(RSALv2)许可。详情请参见 [Redis GitHub](https://github.com/redis/redis)。 diff --git a/src/redis/.env.example b/src/redis/.env.example index 5118663..df46b24 100644 --- a/src/redis/.env.example +++ b/src/redis/.env.example @@ -1,11 +1,25 @@ +# Global registry prefix for all images (optional) +GLOBAL_REGISTRY= + # Redis version REDIS_VERSION=8.2.1-alpine3.22 # Password for Redis authentication (leave empty for no password) -REDIS_PASSWORD=passw0rd +REDIS_PASSWORD= # Port to bind to on the host machine REDIS_PORT_OVERRIDE=6379 # Timezone (e.g., UTC, Asia/Shanghai, America/New_York) TZ=UTC + +# Skip permission fixing (set to 1 to skip) +SKIP_FIX_PERMS= + +# CPU limits +REDIS_CPU_LIMIT=0.50 +REDIS_CPU_RESERVATION=0.25 + +# Memory limits +REDIS_MEMORY_LIMIT=256M +REDIS_MEMORY_RESERVATION=128M diff --git a/src/redis/README.md b/src/redis/README.md index 1c5014b..e3371cf 100644 --- a/src/redis/README.md +++ b/src/redis/README.md @@ -2,24 +2,60 @@ [English](./README.md) | [中文](./README.zh.md) -This service deploys Redis, an in-memory key-value store for caching and message brokering. +This service deploys Redis, a high-performance in-memory key-value store for caching, session management, and message brokering. ## Services -- `redis`: The Redis service. +- `redis`: The Redis service (port 6379) + +## Quick Start + +```bash +docker compose up -d +``` ## Environment Variables -| Variable Name | Description | Default Value | -| ------------------- | -------------------------------------------------------- | ------------------ | -| REDIS_VERSION | Redis image version | `8.2.1-alpine3.22` | -| SKIP_FIX_PERMS | Skip permission fixing, set to 1 to skip | `""` | -| REDIS_PASSWORD | Password for the default "default" user | `""` | -| REDIS_PORT_OVERRIDE | Host port mapping (maps to Redis port 6379 in container) | 6379 | +| Variable Name | Description | Default Value | +| -------------------------- | -------------------------------------------------------- | ------------------ | +| `GLOBAL_REGISTRY` | Global registry prefix for all images | `""` | +| `REDIS_VERSION` | Redis image version | `8.2.1-alpine3.22` | +| `REDIS_PASSWORD` | Password for Redis authentication (empty = no auth) | `""` | +| `REDIS_PORT_OVERRIDE` | Host port mapping (maps to Redis port 6379 in container) | `6379` | +| `TZ` | Timezone | `UTC` | +| `SKIP_FIX_PERMS` | Skip permission fixing (set to 1 to skip) | `""` | +| `REDIS_CPU_LIMIT` | CPU limit | `0.50` | +| `REDIS_CPU_RESERVATION` | CPU reservation | `0.25` | +| `REDIS_MEMORY_LIMIT` | Memory limit | `256M` | +| `REDIS_MEMORY_RESERVATION` | Memory reservation | `128M` | Please modify the `.env` file as needed for your use case. ## Volumes -- `redis_data`: A volume for storing Redis data. -- `redis.conf`: Optional custom configuration file (mount to `/etc/redis/redis.conf`). +- `redis_data`: A named volume for storing Redis data files + +## Custom Configuration + +To use a custom `redis.conf` file, uncomment the volume mount in `docker-compose.yaml`: + +```yaml +volumes: + - ./redis.conf:/etc/redis/redis.conf +``` + +Then modify the `command` section to use the custom config: + +```yaml +command: redis-server /etc/redis/redis.conf +``` + +## Security Notes + +- By default, Redis runs without authentication. Set `REDIS_PASSWORD` to enable authentication. +- Redis runs as the default user in the official image. +- Consider using TLS/SSL for production deployments. + +## License + +Redis is open source and licensed under the [BSD 3-Clause License](https://redis.io/docs/about/license/). diff --git a/src/redis/README.zh.md b/src/redis/README.zh.md index 940fc43..db701e0 100644 --- a/src/redis/README.zh.md +++ b/src/redis/README.zh.md @@ -2,24 +2,60 @@ [English](./README.md) | [中文](./README.zh.md) -此服务用于部署 Redis,一个用于缓存和消息队列的内存键值数据库。 +此服务用于部署 Redis,一个高性能的内存键值存储,用于缓存、会话管理和消息队列。 ## 服务 -- `redis`: Redis 服务。 +- `redis`:Redis 服务(端口 6379) + +## 快速开始 + +```bash +docker compose up -d +``` ## 环境变量 -| 变量名 | 说明 | 默认值 | -| ------------------- | -------------------------------------------- | ------------------ | -| REDIS_VERSION | Redis 镜像版本 | `8.2.1-alpine3.22` | -| SKIP_FIX_PERMS | 跳过权限修复,设置为 1 跳过 | `""` | -| REDIS_PASSWORD | 默认 "default" 用户的密码 | `""` | -| REDIS_PORT_OVERRIDE | 主机端口映射(映射到容器内 Redis 端口 6379) | 6379 | +| 变量名 | 说明 | 默认值 | +| -------------------------- | -------------------------------------------- | ------------------ | +| `GLOBAL_REGISTRY` | 全局镜像仓库前缀 | `""` | +| `REDIS_VERSION` | Redis 镜像版本 | `8.2.1-alpine3.22` | +| `REDIS_PASSWORD` | Redis 认证密码(留空表示不启用认证) | `""` | +| `REDIS_PORT_OVERRIDE` | 主机端口映射(映射到容器内 Redis 端口 6379) | `6379` | +| `TZ` | 时区 | `UTC` | +| `SKIP_FIX_PERMS` | 跳过权限修复(设置为 1 跳过) | `""` | +| `REDIS_CPU_LIMIT` | CPU 限制 | `0.50` | +| `REDIS_CPU_RESERVATION` | CPU 预留 | `0.25` | +| `REDIS_MEMORY_LIMIT` | 内存限制 | `256M` | +| `REDIS_MEMORY_RESERVATION` | 内存预留 | `128M` | 请根据实际需求修改 `.env` 文件。 ## 卷 -- `redis_data`: 用于存储 Redis 数据的卷。 -- `redis.conf`: 可选的自定义配置文件(挂载到 `/etc/redis/redis.conf`)。 +- `redis_data`:用于存储 Redis 数据文件的命名卷 + +## 自定义配置 + +如需使用自定义的 `redis.conf` 文件,请在 `docker-compose.yaml` 中取消注释卷挂载: + +```yaml +volumes: + - ./redis.conf:/etc/redis/redis.conf +``` + +然后修改 `command` 部分以使用自定义配置: + +```yaml +command: redis-server /etc/redis/redis.conf +``` + +## 安全提示 + +- 默认情况下,Redis 不启用认证。请设置 `REDIS_PASSWORD` 以启用认证。 +- Redis 使用官方镜像中的默认用户运行。 +- 生产环境部署建议使用 TLS/SSL。 + +## 许可证 + +Redis 是开源软件,采用 [BSD 3-Clause License](https://redis.io/docs/about/license/) 许可。 diff --git a/src/redis/docker-compose.yaml b/src/redis/docker-compose.yaml index 7b53a94..0cfc266 100644 --- a/src/redis/docker-compose.yaml +++ b/src/redis/docker-compose.yaml @@ -38,11 +38,11 @@ services: deploy: resources: limits: - cpus: '0.50' - memory: 512M + cpus: ${REDIS_CPU_LIMIT:-0.50} + memory: ${REDIS_MEMORY_LIMIT:-256M} reservations: - cpus: '0.25' - memory: 256M + cpus: ${REDIS_CPU_RESERVATION:-0.25} + memory: ${REDIS_MEMORY_RESERVATION:-128M} volumes: redis_data: diff --git a/src/vllm/README.zh.md b/src/vllm/README.zh.md new file mode 100644 index 0000000..db5743c --- /dev/null +++ b/src/vllm/README.zh.md @@ -0,0 +1,139 @@ +# vLLM + +[English](./README.md) | [中文](./README.zh.md) + +此服务用于部署 vLLM,一个用于大语言模型的高吞吐量和内存高效的推理和服务引擎。 + +## 服务 + +- `vllm`:vLLM OpenAI 兼容 API 服务器 + +## 环境变量 + +| 变量名 | 说明 | 默认值 | +| ---------------------- | -------------------------------- | ------------------- | +| `VLLM_VERSION` | vLLM 镜像版本 | `v0.8.0` | +| `VLLM_MODEL` | 模型名称或路径 | `facebook/opt-125m` | +| `VLLM_MAX_MODEL_LEN` | 最大上下文长度 | `2048` | +| `VLLM_GPU_MEMORY_UTIL` | GPU 内存利用率(0.0-1.0) | `0.9` | +| `HF_TOKEN` | 用于模型下载的 Hugging Face 令牌 | `""` | +| `VLLM_PORT_OVERRIDE` | 主机端口映射 | `8000` | + +请根据实际需求修改 `.env` 文件。 + +## 卷 + +- `vllm_models`:来自 Hugging Face 的缓存模型文件 + +## GPU 支持 + +此服务需要 NVIDIA GPU 才能正常运行。在 `docker-compose.yaml` 中取消注释 GPU 配置: + +```yaml + deploy: + resources: + reservations: + devices: + - driver: nvidia + count: 1 + capabilities: [gpu] + runtime: nvidia +``` + +## 使用方法 + +### 启动 vLLM + +```bash +docker compose up -d +``` + +### 访问 + +- API 端点: +- OpenAI 兼容 API: + +### 测试 API + +```bash +curl http://localhost:8000/v1/completions \ + -H "Content-Type: application/json" \ + -d '{ + "model": "facebook/opt-125m", + "prompt": "San Francisco is a", + "max_tokens": 50, + "temperature": 0.7 + }' +``` + +### 聊天补全 + +```bash +curl http://localhost:8000/v1/chat/completions \ + -H "Content-Type: application/json" \ + -d '{ + "model": "facebook/opt-125m", + "messages": [{"role": "user", "content": "Hello!"}] + }' +``` + +## 支持的模型 + +vLLM 支持多种模型: + +- **LLaMA**:LLaMA、LLaMA-2、LLaMA-3 +- **Mistral**:Mistral、Mixtral +- **Qwen**:Qwen、Qwen2 +- **Yi**:Yi、Yi-VL +- **以及更多**:参见 [vLLM 支持的模型](https://docs.vllm.ai/en/latest/models/supported_models.html) + +要使用不同的模型,请更改 `VLLM_MODEL` 环境变量: + +```bash +# 示例:使用 Qwen2-7B-Instruct +VLLM_MODEL="Qwen/Qwen2-7B-Instruct" +``` + +## 性能调优 + +### GPU 内存 + +根据模型大小和可用 VRAM 调整 GPU 内存利用率: + +```bash +VLLM_GPU_MEMORY_UTIL=0.85 # 使用 85% 的 GPU 内存 +``` + +### 上下文长度 + +根据需要设置最大上下文长度: + +```bash +VLLM_MAX_MODEL_LEN=4096 # 支持最多 4K tokens +``` + +### 共享内存 + +对于更大的模型,增加共享内存: + +```yaml +shm_size: 8g # 增加到 8GB +``` + +## 注意事项 + +- 需要支持 CUDA 的 NVIDIA GPU +- 模型下载可能很大(几 GB 到 100+ GB) +- 首次启动可能需要时间来下载模型 +- 确保 GPU 内存足够运行所需模型 +- 默认模型较小(125M 参数)用于测试 + +## 安全性 + +- API 默认没有身份验证 +- 生产环境添加身份验证层(例如,带基本身份验证的 nginx) +- 限制网络访问到受信任的来源 + +## 许可证 + +vLLM 采用 Apache License 2.0 许可。详情请参见 [vLLM GitHub](https://github.com/vllm-project/vllm)。