feat: add restate

This commit is contained in:
Sun-ZhenXing
2025-11-03 20:16:08 +08:00
parent 2a18f63c88
commit eff0807a92
142 changed files with 1395 additions and 338 deletions

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
apache:
<<: *default
<<: *defaults
image: httpd:${APACHE_VERSION:-2.4.62-alpine3.20}
ports:
- "${APACHE_HTTP_PORT_OVERRIDE:-80}:80"

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
apisix:
<<: *default
<<: *defaults
image: apache/apisix:${APISIX_VERSION:-3.13.0-debian}
ports:
- "${APISIX_HTTP_PORT_OVERRIDE:-9080}:9080"
@@ -42,7 +42,7 @@ services:
start_period: 10s
etcd:
<<: *default
<<: *defaults
image: quay.io/coreos/etcd:${ETCD_VERSION:-v3.6.0}
ports:
- "${ETCD_CLIENT_PORT_OVERRIDE:-2379}:2379"
@@ -97,7 +97,7 @@ services:
# Optional: APISIX Dashboard
apisix-dashboard:
<<: *default
<<: *defaults
image: apache/apisix-dashboard:${APISIX_DASHBOARD_VERSION:-3.0.1-alpine}
ports:
- "${APISIX_DASHBOARD_PORT_OVERRIDE:-9000}:9000"

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
bifrost:
<<: *default
<<: *defaults
image: maximhq/bifrost:${BIFROST_VERSION:-v1.2.15}
volumes:
- bifrost_data:/app/data

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
bolt-diy:
<<: *default
<<: *defaults
image: stackblitz/bolt:${BOLT_DIY_VERSION:-latest}
ports:
- "${BOLT_DIY_PORT_OVERRIDE:-5173}:5173"

View File

@@ -25,7 +25,7 @@
#
# License: GPL-3.0 (https://github.com/Budibase/budibase/blob/master/LICENSE)
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -35,7 +35,7 @@ x-default: &default
services:
budibase:
<<: *default
<<: *defaults
image: budibase/budibase:${BUDIBASE_VERSION:-3.23.0}
container_name: budibase
ports:
@@ -89,7 +89,7 @@ services:
memory: "${BUDIBASE_MEMORY_RESERVATION:-512M}"
redis:
<<: *default
<<: *defaults
image: redis:${REDIS_VERSION:-7-alpine}
container_name: budibase-redis
command: redis-server --appendonly yes --maxmemory 256mb --maxmemory-policy allkeys-lru

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
bytebot-desktop:
<<: *default
<<: *defaults
image: ghcr.io/bytebot-ai/bytebot-desktop:${BYTEBOT_VERSION:-edge}
ports:
- "${BYTEBOT_DESKTOP_PORT_OVERRIDE:-9990}:9990"
@@ -31,7 +31,7 @@ services:
start_period: 30s
bytebot-agent:
<<: *default
<<: *defaults
image: ghcr.io/bytebot-ai/bytebot-agent:${BYTEBOT_VERSION:-edge}
depends_on:
bytebot-desktop:
@@ -63,7 +63,7 @@ services:
start_period: 30s
bytebot-ui:
<<: *default
<<: *defaults
image: ghcr.io/bytebot-ai/bytebot-ui:${BYTEBOT_VERSION:-edge}
depends_on:
bytebot-agent:
@@ -84,7 +84,7 @@ services:
memory: 256M
bytebot-db:
<<: *default
<<: *defaults
image: postgres:${POSTGRES_VERSION:-17-alpine}
environment:
- TZ=${TZ:-UTC}

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
cassandra:
<<: *default
<<: *defaults
image: cassandra:${CASSANDRA_VERSION:-5.0.2}
ports:
- "${CASSANDRA_CQL_PORT_OVERRIDE:-9042}:9042"

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
clash:
<<: *default
<<: *defaults
image: centralx/clash:${CLASH_VERSION:-1.18.0}
ports:
- "7880:80"

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
clickhouse:
<<: *default
<<: *defaults
image: clickhouse/clickhouse-server:${CLICKHOUSE_VERSION:-24.11.1.2557}
hostname: clickhouse
environment:

View File

@@ -23,7 +23,7 @@
#
# License: Apache-2.0 (https://github.com/conductor-oss/conductor/blob/main/LICENSE)
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -33,7 +33,7 @@ x-default: &default
services:
conductor-server:
<<: *default
<<: *defaults
image: conductor:server
build:
context: https://github.com/conductor-oss/conductor.git#main:docker/server
@@ -81,7 +81,7 @@ services:
memory: "${CONDUCTOR_MEMORY_RESERVATION:-512M}"
postgres:
<<: *default
<<: *defaults
image: postgres:${POSTGRES_VERSION:-16-alpine}
container_name: conductor-postgres
environment:
@@ -107,7 +107,7 @@ services:
memory: "${POSTGRES_MEMORY_RESERVATION:-256M}"
elasticsearch:
<<: *default
<<: *defaults
image: elasticsearch:${ELASTICSEARCH_VERSION:-8.11.0}
container_name: conductor-elasticsearch
environment:

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
consul:
<<: *default
<<: *defaults
image: consul:${CONSUL_VERSION:-1.20.3}
ports:
- "${CONSUL_HTTP_PORT_OVERRIDE:-8500}:8500"

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
dify-api:
<<: *default
<<: *defaults
image: langgenius/dify-api:${DIFY_VERSION:-0.18.2}
depends_on:
dify-db:
@@ -47,7 +47,7 @@ services:
start_period: 30s
dify-worker:
<<: *default
<<: *defaults
image: langgenius/dify-api:${DIFY_VERSION:-0.18.2}
depends_on:
dify-db:
@@ -80,7 +80,7 @@ services:
memory: 1G
dify-web:
<<: *default
<<: *defaults
image: langgenius/dify-web:${DIFY_VERSION:-0.18.2}
depends_on:
dify-api:
@@ -101,7 +101,7 @@ services:
memory: 256M
dify-db:
<<: *default
<<: *defaults
image: postgres:15-alpine
environment:
- TZ=${TZ:-UTC}
@@ -127,7 +127,7 @@ services:
start_period: 30s
dify-redis:
<<: *default
<<: *defaults
image: redis:7-alpine
command: redis-server --requirepass ${REDIS_PASSWORD:-}
environment:
@@ -150,7 +150,7 @@ services:
start_period: 5s
dify-weaviate:
<<: *default
<<: *defaults
image: semitechnologies/weaviate:${WEAVIATE_VERSION:-1.28.12}
profiles:
- weaviate

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
dnsmasq:
<<: *default
<<: *defaults
image: dockurr/dnsmasq:${DNSMASQ_VERSION:-2.91}
volumes:
- ./dnsmasq.conf:/etc/dnsmasq.conf:ro

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
registry:
<<: *default
<<: *defaults
image: registry:${REGISTRY_VERSION:-3.0.0}
volumes:
- ./certs:/certs:ro

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
dockge:
<<: *default
<<: *defaults
image: louislam/dockge:${DOCKGE_VERSION:-1}
ports:
- "${PORT_OVERRIDE:-5001}:5001"

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
duckdb:
<<: *default
<<: *defaults
image: davidgasquez/duckdb:${DUCKDB_VERSION:-v1.1.3}
command: ["duckdb", "/data/duckdb.db"]
stdin_open: true

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
easy-dataset:
<<: *default
<<: *defaults
image: ghcr.io/conardli/easy-dataset:${EASY_DATASET_VERSION:-1.5.1}
ports:
- "${EASY_DATASET_PORT_OVERRIDE:-1717}:1717"

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
elasticsearch:
<<: *default
<<: *defaults
image: docker.elastic.co/elasticsearch/elasticsearch:${ELASTICSEARCH_VERSION:-8.16.1}
ports:
- "${ELASTICSEARCH_HTTP_PORT_OVERRIDE:-9200}:9200"

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
etcd:
<<: *default
<<: *defaults
image: quay.io/coreos/etcd:${ETCD_VERSION:-v3.6.0}
ports:
- "${ETCD_CLIENT_PORT_OVERRIDE:-2379}:2379"

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -38,7 +38,7 @@ x-common-env: &common-env
services:
playwright-service:
<<: *default
<<: *defaults
image: ghcr.io/firecrawl/playwright-service:${PLAYWRIGHT_VERSION:-latest}
environment:
PORT: 3000
@@ -56,7 +56,7 @@ services:
memory: 512M
api:
<<: *default
<<: *defaults
image: ghcr.io/firecrawl/firecrawl:${FIRECRAWL_VERSION:-latest}
environment:
<<: *common-env
@@ -99,7 +99,7 @@ services:
start_period: 30s
redis:
<<: *default
<<: *defaults
image: redis:${REDIS_VERSION:-alpine}
command: redis-server --bind 0.0.0.0
volumes:
@@ -120,7 +120,7 @@ services:
start_period: 5s
nuq-postgres:
<<: *default
<<: *defaults
image: ghcr.io/firecrawl/nuq-postgres:${NUQ_POSTGRES_VERSION:-latest}
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
jobmanager:
<<: *default
<<: *defaults
image: flink:${FLINK_VERSION:-1.20.0-scala_2.12-java11}
hostname: jobmanager
command: jobmanager
@@ -42,7 +42,7 @@ services:
start_period: 30s
taskmanager:
<<: *default
<<: *defaults
image: flink:${FLINK_VERSION:-1.20.0-scala_2.12-java11}
command: taskmanager
environment:

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
frpc:
<<: *default
<<: *defaults
image: snowdreamtech/frpc:${FRPC_VERSION:-0.64.0}
volumes:
- ./frpc.toml:/etc/frp/frpc.toml:ro

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
frps:
<<: *default
<<: *defaults
image: snowdreamtech/frps:${FRPS_VERSION:-0.64.0}
volumes:
- ./frps.toml:/etc/frp/frps.toml:ro

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
gitea_runner:
<<: *default
<<: *defaults
image: gitea/act_runner:0.2.12
environment:
TZ: ${TZ:-UTC}

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
gitea:
<<: *default
<<: *defaults
image: gitea/gitea:${GITEA_VERSION:-1.24.6-rootless}
environment:
- USER_UID=1000
@@ -43,7 +43,7 @@ services:
start_period: 30s
db:
<<: *default
<<: *defaults
image: postgres:${POSTGRES_VERSION:-17.6}
environment:
- TZ=${TZ:-UTC}

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
gitlab-runner:
<<: *default
<<: *defaults
image: gitlab/gitlab-runner:${GITLAB_RUNNER_VERSION:-alpine3.21-v18.4.0}
volumes:
- /var/run/docker.sock:/var/run/docker.sock

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
gitlab:
<<: *default
<<: *defaults
image: gitlab/gitlab-ce:${GITLAB_VERSION:-18.4.0-ce.0}
ports:
- "${GITLAB_PORT_OVERRIDE_HTTPS:-5443}:443"

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
gpustack:
<<: *default
<<: *defaults
image: gpustack/gpustack:${GPUSTACK_VERSION:-v0.7.1}
ports:
- "${GPUSTACK_PORT_OVERRIDE:-80}:80"

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
grafana:
<<: *default
<<: *defaults
image: grafana/grafana:${GRAFANA_VERSION:-12.1.1}
ports:
- "${GRAFANA_PORT_OVERRIDE:-3000}:3000"

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
halo:
<<: *default
<<: *defaults
image: halohub/halo:${HALO_VERSION:-2.21.9}
ports:
- "${HALO_PORT:-8090}:8090"
@@ -42,7 +42,7 @@ services:
start_period: 60s
halo-db:
<<: *default
<<: *defaults
image: postgres:${POSTGRES_VERSION:-17.2-alpine3.21}
environment:
- TZ=${TZ:-UTC}

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -9,7 +9,7 @@ x-default: &default
services:
# Harbor Core
harbor-core:
<<: *default
<<: *defaults
image: goharbor/harbor-core:${HARBOR_VERSION:-v2.12.0}
depends_on:
harbor-db:
@@ -47,7 +47,7 @@ services:
# Harbor JobService
harbor-jobservice:
<<: *default
<<: *defaults
image: goharbor/harbor-jobservice:${HARBOR_VERSION:-v2.12.0}
depends_on:
harbor-db:
@@ -70,7 +70,7 @@ services:
# Harbor Registry
harbor-registry:
<<: *default
<<: *defaults
image: goharbor/registry-photon:${HARBOR_VERSION:-v2.12.0}
volumes:
- harbor_registry:/storage
@@ -86,14 +86,14 @@ services:
# Harbor Portal (UI)
harbor-portal:
<<: *default
<<: *defaults
image: goharbor/harbor-portal:${HARBOR_VERSION:-v2.12.0}
environment:
- TZ=${TZ:-UTC}
# Harbor Proxy (Nginx)
harbor-proxy:
<<: *default
<<: *defaults
image: goharbor/nginx-photon:${HARBOR_VERSION:-v2.12.0}
ports:
- "${HARBOR_HTTP_PORT_OVERRIDE:-80}:8080"
@@ -116,7 +116,7 @@ services:
# Harbor Database
harbor-db:
<<: *default
<<: *defaults
image: goharbor/harbor-db:${HARBOR_VERSION:-v2.12.0}
volumes:
- harbor_db:/var/lib/postgresql/data
@@ -141,7 +141,7 @@ services:
# Harbor Redis
harbor-redis:
<<: *default
<<: *defaults
image: goharbor/redis-photon:${HARBOR_VERSION:-v2.12.0}
volumes:
- harbor_redis:/var/lib/redis

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
hbase:
<<: *default
<<: *defaults
image: harisekhon/hbase:${HBASE_VERSION:-2.6}
hostname: hbase
environment:

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
lama-cleaner:
<<: *default
<<: *defaults
image: ${DOCKER_REGISTRY:-docker.io}/local/lama-cleaner:${BUILD_VERSION:-latest}
ports:
- 8080:8080

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
jenkins:
<<: *default
<<: *defaults
image: jenkins/jenkins:${JENKINS_VERSION:-2.486-lts-jdk17}
ports:
- "${JENKINS_HTTP_PORT_OVERRIDE:-8080}:8080"

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
officeconverter:
<<: *default
<<: *defaults
image: ghcr.io/eugenmayer/kontextwork-converter:${OFFICECONVERTER_VERSION:-latest}
ports:
- "${OFFICECONVERTER_PORT_OVERRIDE:-8000}:8000"

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -9,7 +9,7 @@ x-default: &default
services:
# Zookeeper for Kafka coordination
zookeeper:
<<: *default
<<: *defaults
image: confluentinc/cp-zookeeper:${KAFKA_VERSION:-7.8.0}
ports:
- "${ZOOKEEPER_CLIENT_PORT_OVERRIDE:-2181}:2181"
@@ -42,7 +42,7 @@ services:
# Kafka broker
kafka:
<<: *default
<<: *defaults
image: confluentinc/cp-kafka:${KAFKA_VERSION:-7.8.0}
depends_on:
zookeeper:
@@ -90,7 +90,7 @@ services:
# Kafka UI (optional)
kafka-ui:
<<: *default
<<: *defaults
image: provectuslabs/kafka-ui:${KAFKA_UI_VERSION:-latest}
depends_on:
kafka:

View File

@@ -24,7 +24,7 @@
#
# License: Apache-2.0 (https://github.com/kestra-io/kestra/blob/develop/LICENSE)
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -34,7 +34,7 @@ x-default: &default
services:
kestra:
<<: *default
<<: *defaults
image: kestra/kestra:${KESTRA_VERSION:-latest-full}
container_name: kestra
command: server standalone
@@ -91,7 +91,7 @@ services:
memory: "${KESTRA_MEMORY_RESERVATION:-512M}"
postgres:
<<: *default
<<: *defaults
image: postgres:${POSTGRES_VERSION:-16-alpine}
container_name: kestra-postgres
environment:

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
kibana:
<<: *default
<<: *defaults
image: docker.elastic.co/kibana/kibana:${KIBANA_VERSION:-8.16.1}
ports:
- "${KIBANA_PORT_OVERRIDE:-5601}:5601"

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
kodbox:
<<: *default
<<: *defaults
image: kodcloud/kodbox:${KODBOX_VERSION:-1.62}
ports:
- "${KODBOX_PORT:-80}:80"
@@ -45,7 +45,7 @@ services:
start_period: 30s
kodbox-db:
<<: *default
<<: *defaults
image: mysql:${MYSQL_VERSION:-9.4.0}
environment:
- TZ=${TZ:-UTC}
@@ -75,7 +75,7 @@ services:
memory: 256M
kodbox-redis:
<<: *default
<<: *defaults
image: redis:${REDIS_VERSION:-8.2.1-alpine3.22}
command:
- redis-server

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -9,7 +9,7 @@ x-default: &default
services:
# Kong Database
kong-db:
<<: *default
<<: *defaults
image: postgres:${POSTGRES_VERSION:-16.6-alpine3.21}
volumes:
- kong_db_data:/var/lib/postgresql/data
@@ -35,7 +35,7 @@ services:
# Kong Database Migration
kong-migrations:
<<: *default
<<: *defaults
image: kong:${KONG_VERSION:-3.8.0-alpine}
depends_on:
kong-db:
@@ -52,7 +52,7 @@ services:
# Kong Gateway
kong:
<<: *default
<<: *defaults
image: kong:${KONG_VERSION:-3.8.0-alpine}
depends_on:
kong-db:
@@ -97,7 +97,7 @@ services:
# Kong Manager (Optional GUI)
kong-gui:
<<: *default
<<: *defaults
image: pantsel/konga:${KONGA_VERSION:-latest}
depends_on:
kong:

View File

@@ -25,7 +25,7 @@
#
# License: MIT (https://github.com/langflow-ai/langflow/blob/main/LICENSE)
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -35,7 +35,7 @@ x-default: &default
services:
langflow:
<<: *default
<<: *defaults
image: langflowai/langflow:${LANGFLOW_VERSION:-latest}
pull_policy: always
container_name: langflow
@@ -99,7 +99,7 @@ services:
memory: "${LANGFLOW_MEMORY_RESERVATION:-512M}"
postgres:
<<: *default
<<: *defaults
image: postgres:${POSTGRES_VERSION:-16-alpine}
container_name: langflow-postgres
environment:

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
langfuse-server:
<<: *default
<<: *defaults
image: langfuse/langfuse:${LANGFUSE_VERSION:-3.115.0}
ports:
- "${LANGFUSE_PORT:-3000}:3000"
@@ -39,7 +39,7 @@ services:
start_period: 30s
langfuse-db:
<<: *default
<<: *defaults
image: postgres:${POSTGRES_VERSION:-17.2-alpine3.21}
environment:
- TZ=${TZ:-UTC}

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
libreoffice:
<<: *default
<<: *defaults
image: lscr.io/linuxserver/libreoffice:${LIBREOFFICE_VERSION:-latest}
ports:
- "${LIBREOFFICE_HTTP_PORT_OVERRIDE:-3000}:3000"

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
litellm:
<<: *default
<<: *defaults
build:
context: .
args:
@@ -48,7 +48,7 @@ services:
memory: 512M
db:
<<: *default
<<: *defaults
image: postgres:${POSTGRES_VERSION:-16}
environment:
- POSTGRES_DB=litellm
@@ -75,7 +75,7 @@ services:
memory: 256M
prometheus:
<<: *default
<<: *defaults
image: prom/prometheus:${PROMETHEUS_VERSION:-v3.3.1}
profiles:
- metrics

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
logstash:
<<: *default
<<: *defaults
image: docker.elastic.co/logstash/logstash:${LOGSTASH_VERSION:-8.16.1}
ports:
- "${LOGSTASH_BEATS_PORT_OVERRIDE:-5044}:5044"

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -7,7 +7,7 @@ x-default: &default
max-file: "3"
x-mariadb-galera: &mariadb-galera
<<: *default
<<: *defaults
image: mariadb:${MARIADB_VERSION:-11.7.2}
environment: &galera-env
TZ: ${TZ:-UTC}

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
milvus-standalone-embed:
<<: *default
<<: *defaults
image: milvusdb/milvus:${MILVUS_VERSION:-v2.6.3}
security_opt:
- seccomp:unconfined
@@ -44,7 +44,7 @@ services:
memory: 2G
attu:
<<: *default
<<: *defaults
image: zilliz/attu:${ATTU_VERSION:-v2.6.1}
profiles:
- attu

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
etcd:
<<: *default
<<: *defaults
image: quay.io/coreos/etcd:${ETCD_VERSION:-v3.5.18}
environment:
- TZ=${TZ:-UTC}
@@ -35,7 +35,7 @@ services:
memory: 128M
minio:
<<: *default
<<: *defaults
image: minio/minio:${MINIO_VERSION:-RELEASE.2024-12-18T13-15-44Z}
environment:
TZ: ${TZ:-UTC}
@@ -63,7 +63,7 @@ services:
memory: 256M
milvus-standalone:
<<: *default
<<: *defaults
image: milvusdb/milvus:${MILVUS_VERSION:-v2.6.3}
command: ["milvus", "run", "standalone"]
security_opt:
@@ -99,7 +99,7 @@ services:
memory: 2G
attu:
<<: *default
<<: *defaults
image: zilliz/attu:${ATTU_VERSION:-v2.6.1}
profiles:
- attu

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
minecraft-bedrock:
<<: *default
<<: *defaults
image: itzg/minecraft-bedrock-server:${BEDROCK_VERSION:-latest}
environment:
TZ: ${TZ:-UTC}

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -7,7 +7,7 @@ x-default: &default
max-file: "3"
x-mineru-sglang: &mineru-sglang
<<: *default
<<: *defaults
image: ${MINERU_DOCKER_IMAGE:-alexsuntop/mineru-sglang:2.2.2}
environment:
TZ: ${TZ:-UTC}

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -7,7 +7,7 @@ x-default: &default
max-file: "3"
x-mineru-vllm: &mineru-vllm
<<: *default
<<: *defaults
image: ${MINERU_DOCKER_IMAGE:-alexsuntop/mineru:2.6.2}
build:
context: .

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
minio:
<<: *default
<<: *defaults
image: minio/minio:${MINIO_VERSION:-RELEASE.2025-09-07T16-13-09Z}
ports:
- "${MINIO_PORT_OVERRIDE_API:-9000}:9000"

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
postgres:
<<: *default
<<: *defaults
image: postgres:${POSTGRES_VERSION:-17.6-alpine}
environment:
TZ: ${TZ:-UTC}
@@ -33,7 +33,7 @@ services:
start_period: 30s
minio:
<<: *default
<<: *defaults
image: minio/minio:${MINIO_VERSION:-RELEASE.2025-01-07T16-13-09Z}
command: server /data --console-address ":9001"
environment:
@@ -61,7 +61,7 @@ services:
start_period: 30s
minio-init:
<<: *default
<<: *defaults
image: minio/mc:${MINIO_MC_VERSION:-RELEASE.2025-01-07T17-25-52Z}
depends_on:
minio:
@@ -76,7 +76,7 @@ services:
restart: "no"
mlflow:
<<: *default
<<: *defaults
image: ghcr.io/mlflow/mlflow:${MLFLOW_VERSION:-v2.20.2}
depends_on:
postgres:

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -7,7 +7,7 @@ x-default: &default
max-file: "3"
x-mongo: &mongo
<<: *default
<<: *defaults
image: mongo:${MONGO_VERSION:-8.0.13}
environment:
TZ: ${TZ:-UTC}
@@ -50,7 +50,7 @@ services:
- "${MONGO_PORT_OVERRIDE_1:-27017}:27017"
mongo-init:
<<: *default
<<: *defaults
image: mongo:${MONGO_VERSION:-8.0.13}
restart: on-failure
depends_on:

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -7,7 +7,7 @@ x-default: &default
max-file: "3"
x-mongo: &mongo
<<: *default
<<: *defaults
image: mongo:${MONGO_VERSION:-8.0.13}
environment:
TZ: ${TZ:-UTC}
@@ -59,7 +59,7 @@ services:
- "${MONGO_PORT_OVERRIDE_3:-27019}:27017"
mongo-init:
<<: *default
<<: *defaults
image: mongo:${MONGO_VERSION:-8.0.13}
restart: on-failure
depends_on:

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
mongo:
<<: *default
<<: *defaults
image: mongo:${MONGO_VERSION:-8.0.13}
environment:
TZ: ${TZ:-UTC}

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
mysql:
<<: *default
<<: *defaults
image: mysql:${MYSQL_VERSION:-9.4.0}
ports:
- "${MYSQL_PORT_OVERRIDE:-3306}:3306"

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
n8n:
<<: *default
<<: *defaults
image: n8nio/n8n:${N8N_VERSION:-1.114.0}
ports:
- "${N8N_PORT:-5678}:5678"
@@ -55,7 +55,7 @@ services:
start_period: 30s
n8n-db:
<<: *default
<<: *defaults
image: postgres:${POSTGRES_VERSION:-17.2-alpine3.21}
environment:
- TZ=${TZ:-UTC}

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
nacos:
<<: *default
<<: *defaults
image: nacos/nacos-server:${NACOS_VERSION:-v3.1.0-slim}
ports:
- "${NACOS_HTTP_PORT_OVERRIDE:-8848}:8848"

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
metad:
<<: *default
<<: *defaults
image: vesoft/nebula-metad:${NEBULA_VERSION:-v3.8.0}
environment:
- TZ=${TZ:-UTC}
@@ -43,7 +43,7 @@ services:
start_period: 30s
storaged:
<<: *default
<<: *defaults
image: vesoft/nebula-storaged:${NEBULA_VERSION:-v3.8.0}
environment:
- TZ=${TZ:-UTC}
@@ -81,7 +81,7 @@ services:
start_period: 30s
graphd:
<<: *default
<<: *defaults
image: vesoft/nebula-graphd:${NEBULA_VERSION:-v3.8.0}
environment:
- TZ=${TZ:-UTC}

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
neo4j:
<<: *default
<<: *defaults
image: neo4j:${NEO4J_VERSION:-5.27.4-community}
ports:
- "${NEO4J_HTTP_PORT_OVERRIDE:-7474}:7474"

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
nginx:
<<: *default
<<: *defaults
image: nginx:${NGINX_VERSION:-1.29.2-alpine3.22}
ports:
- "${NGINX_HTTP_PORT_OVERRIDE:-80}:80"

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
node-exporter:
<<: *default
<<: *defaults
image: prom/node-exporter:${NODE_EXPORTER_VERSION:-v1.8.2}
ports:
- "${NODE_EXPORTER_PORT_OVERRIDE:-9100}:9100"

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
oceanbase:
<<: *default
<<: *defaults
image: oceanbase/oceanbase-ce:${OCEANBASE_VERSION:-4.3.3.1-106000012024110114}
environment:
TZ: ${TZ:-UTC}

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
odoo:
<<: *default
<<: *defaults
image: odoo:${ODOO_VERSION:-19.0}
depends_on:
odoo-db:
@@ -41,7 +41,7 @@ services:
start_period: 60s
odoo-db:
<<: *default
<<: *defaults
image: postgres:${POSTGRES_VERSION:-17-alpine}
environment:
- TZ=${TZ:-UTC}

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
ollama:
<<: *default
<<: *defaults
image: ollama/ollama:${OLLAMA_VERSION:-0.12.6}
ports:
- "${OLLAMA_PORT_OVERRIDE:-11434}:11434"

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
open_webui:
<<: *default
<<: *defaults
image: ghcr.io/open-webui/open-webui:${OPEN_WEBUI_VERSION:-main}
ports:
- "${OPEN_WEBUI_PORT_OVERRIDE:-8080}:8080"

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
db:
<<: *default
<<: *defaults
image: postgres:${POSTGRES_VERSION:-17}
environment:
TZ: ${TZ:-UTC}
@@ -35,7 +35,7 @@ services:
memory: 256M
redis:
<<: *default
<<: *defaults
image: redis:${REDIS_VERSION:-7-alpine}
ports:
- "${REDIS_PORT_OVERRIDE:-6379}:6379"
@@ -55,7 +55,7 @@ services:
memory: 128M
serverless-redis-http:
<<: *default
<<: *defaults
image: hiett/serverless-redis-http:${SERVERLESS_REDIS_HTTP_VERSION:-latest}
ports:
- "${SERVERLESS_REDIS_HTTP_PORT_OVERRIDE:-8079}:80"
@@ -82,7 +82,7 @@ services:
memory: 64M
web:
<<: *default
<<: *defaults
image: ${OPENCUT_WEB_IMAGE:-opencut/web:latest}
ports:
- "${OPENCUT_WEB_PORT_OVERRIDE:-3100}:3000"

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
openlist:
<<: *default
<<: *defaults
image: openlistteam/openlist:${OPENLIST_VERSION:-latest}
ports:
- "${OPENLIST_PORT_OVERRIDE:-5244}:5244"

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
opensearch:
<<: *default
<<: *defaults
image: opensearchproject/opensearch:${OPENSEARCH_VERSION:-2.19.0}
environment:
TZ: ${TZ:-UTC}
@@ -47,7 +47,7 @@ services:
start_period: 60s
opensearch-dashboards:
<<: *default
<<: *defaults
image: opensearchproject/opensearch-dashboards:${OPENSEARCH_DASHBOARDS_VERSION:-2.19.0}
ports:
- "${OPENSEARCH_DASHBOARDS_PORT_OVERRIDE:-5601}:5601"

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
pocketbase:
<<: *default
<<: *defaults
image: ghcr.io/muchobien/pocketbase:${PB_VERSION:-0.30.0}
environment:
TZ: ${TZ:-UTC}

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
portainer:
<<: *default
<<: *defaults
image: portainer/portainer-ce:${PORTAINER_VERSION:-2.27.3-alpine}
ports:
- "${PORTAINER_WEB_PORT_OVERRIDE:-9000}:9000"

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
portkey-gateway:
<<: *default
<<: *defaults
image: portkeyai/gateway:${PORTKEY_GATEWAY_VERSION:-latest}
ports:
- "${PORTKEY_GATEWAY_PORT_OVERRIDE:-8787}:8787"

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
postgres:
<<: *default
<<: *defaults
image: postgres:${POSTGRES_VERSION:-17.6}
environment:
TZ: ${TZ:-UTC}

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
prometheus:
<<: *default
<<: *defaults
image: prom/prometheus:${PROMETHEUS_VERSION:-v3.5.0}
ports:
- "${PROMETHEUS_PORT_OVERRIDE:-9090}:9090"

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
pytorch:
<<: *default
<<: *defaults
image: pytorch/pytorch:${PYTORCH_VERSION:-2.6.0-cuda12.6-cudnn9-runtime}
ports:
- "${JUPYTER_PORT_OVERRIDE:-8888}:8888"

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
qdrant:
<<: *default
<<: *defaults
image: qdrant/qdrant:${QDRANT_VERSION:-v1.15.4}
ports:
- "${QDRANT_HTTP_PORT:-6333}:6333"

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
rabbitmq:
<<: *default
<<: *defaults
image: rabbitmq:${RABBITMQ_VERSION:-4.1.4-management-alpine}
volumes:
- rabbitmq_data:/var/lib/rabbitmq

View File

@@ -126,7 +126,7 @@ To add more worker nodes, add new service definitions:
```yaml
ray-worker-3:
<<: *default
<<: *defaults
image: rayproject/ray:${RAY_VERSION:-2.42.1-py312}
container_name: ray-worker-3
command: ray start --address=ray-head:6379 --block

View File

@@ -126,7 +126,7 @@ print(result)
```yaml
ray-worker-3:
<<: *default
<<: *defaults
image: rayproject/ray:${RAY_VERSION:-2.42.1-py312}
container_name: ray-worker-3
command: ray start --address=ray-head:6379 --block

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
ray-head:
<<: *default
<<: *defaults
image: rayproject/ray:${RAY_VERSION:-2.42.1-py312}
command: ray start --head --dashboard-host=0.0.0.0 --port=6379 --block
ports:
@@ -37,7 +37,7 @@ services:
start_period: 30s
ray-worker-1:
<<: *default
<<: *defaults
image: rayproject/ray:${RAY_VERSION:-2.42.1-py312}
command: ray start --address=ray-head:6379 --block
depends_on:
@@ -57,7 +57,7 @@ services:
memory: 2G
ray-worker-2:
<<: *default
<<: *defaults
image: rayproject/ray:${RAY_VERSION:-2.42.1-py312}
command: ray start --address=ray-head:6379 --block
depends_on:

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -37,7 +37,7 @@ services:
- init
redis-1:
<<: *default
<<: *defaults
image: redis:${REDIS_VERSION:-8.2.1-alpine}
environment:
- TZ=${TZ:-UTC}
@@ -62,7 +62,7 @@ services:
start_period: 5s
redis-2:
<<: *default
<<: *defaults
image: redis:${REDIS_VERSION:-8.2.1-alpine}
environment:
- TZ=${TZ:-UTC}
@@ -87,7 +87,7 @@ services:
start_period: 5s
redis-3:
<<: *default
<<: *defaults
image: redis:${REDIS_VERSION:-8.2.1-alpine}
environment:
- TZ=${TZ:-UTC}
@@ -112,7 +112,7 @@ services:
start_period: 5s
redis-4:
<<: *default
<<: *defaults
image: redis:${REDIS_VERSION:-8.2.1-alpine}
environment:
- TZ=${TZ:-UTC}
@@ -137,7 +137,7 @@ services:
start_period: 5s
redis-5:
<<: *default
<<: *defaults
image: redis:${REDIS_VERSION:-8.2.1-alpine}
environment:
- TZ=${TZ:-UTC}
@@ -162,7 +162,7 @@ services:
start_period: 5s
redis-6:
<<: *default
<<: *defaults
image: redis:${REDIS_VERSION:-8.2.1-alpine}
environment:
- TZ=${TZ:-UTC}

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
redis:
<<: *default
<<: *defaults
image: redis:${REDIS_VERSION:-8.2.1-alpine3.22}
ports:
- "${REDIS_PORT_OVERRIDE:-6379}:6379"

View File

@@ -0,0 +1,49 @@
# Restate version
RESTATE_VERSION=1.5.3
# Cluster configuration
RESTATE_CLUSTER_NAME=restate-cluster
RESTATE_DEFAULT_REPLICATION=2
# Node 1 ports (primary node)
NODE1_INGRESS_PORT_OVERRIDE=8080
NODE1_ADMIN_PORT_OVERRIDE=9070
NODE1_NODE_PORT_OVERRIDE=5122
# Node 2 ports
NODE2_INGRESS_PORT_OVERRIDE=28080
NODE2_ADMIN_PORT_OVERRIDE=29070
NODE2_NODE_PORT_OVERRIDE=25122
# Node 3 ports
NODE3_INGRESS_PORT_OVERRIDE=38080
NODE3_ADMIN_PORT_OVERRIDE=39070
NODE3_NODE_PORT_OVERRIDE=35122
# Node advertised addresses (internal network)
RESTATE_NODE1_ADVERTISED_ADDRESS=http://restate-1:5122
RESTATE_NODE2_ADVERTISED_ADDRESS=http://restate-2:5122
RESTATE_NODE3_ADVERTISED_ADDRESS=http://restate-3:5122
# Metadata client addresses
RESTATE_METADATA_CLIENT__ADDRESSES=["http://restate-1:5122","http://restate-2:5122","http://restate-3:5122"]
# Snapshot configuration
RESTATE_WORKER__SNAPSHOTS__DESTINATION=s3://restate/snapshots
RESTATE_WORKER__SNAPSHOTS__SNAPSHOT_INTERVAL_NUM_RECORDS=1000
RESTATE_WORKER__SNAPSHOTS__AWS_REGION=local
RESTATE_WORKER__SNAPSHOTS__AWS_ENDPOINT_URL=http://minio:9000
RESTATE_WORKER__SNAPSHOTS__AWS_ALLOW_HTTP=true
# MinIO configuration
MINIO_VERSION=latest
MINIO_API_PORT_OVERRIDE=9000
MINIO_CONSOLE_PORT_OVERRIDE=9001
MINIO_ROOT_USER=minioadmin
MINIO_ROOT_PASSWORD=minioadmin
# Timezone
TZ=UTC
# Log level: trace, debug, info, warn, error
RESTATE_LOG_FILTER=restate=info

View File

@@ -0,0 +1,280 @@
# Restate Multi-Node Cluster
A highly-available 3-node Restate cluster for production workloads. This configuration provides fault tolerance and automatic failover capabilities.
## Features
- **High Availability**: 3-node cluster can tolerate 1 node failure
- **Data Replication**: Configurable replication factor (default: 2 of 3 nodes)
- **Automatic Snapshots**: Periodic snapshots stored in MinIO (S3-compatible)
- **Load Distribution**: Multiple ingress endpoints for load balancing
- **Metadata Quorum**: Replicated metadata cluster for consistency
## Quick Start
1. Copy environment file:
```bash
cp .env.example .env
```
2. Start the cluster:
```bash
docker compose up -d
```
3. Verify cluster health:
```bash
# Check node 1
curl http://localhost:9070/health
# Check node 2
curl http://localhost:29070/health
# Check node 3
curl http://localhost:39070/health
```
## Architecture
The cluster consists of:
- **3 Restate Nodes**: Distributed workflow engines with replicated state
- **MinIO**: S3-compatible storage for partition snapshots
- **Replicated Bifrost Provider**: Log replication across nodes
- **Metadata Cluster**: Distributed metadata server on all nodes
## Service Endpoints
### Node 1 (Primary)
- Ingress API: `http://localhost:8080`
- Admin API: `http://localhost:9070`
- Node Communication: Port 5122
### Node 2
- Ingress API: `http://localhost:28080`
- Admin API: `http://localhost:29070`
- Node Communication: Port 25122
### Node 3
- Ingress API: `http://localhost:38080`
- Admin API: `http://localhost:39070`
- Node Communication: Port 35122
### MinIO
- API: `http://localhost:9000`
- Console: `http://localhost:9001` (admin UI)
- Username: `minioadmin`
- Password: `minioadmin`
## Environment Variables
### Cluster Configuration
| Variable | Default | Description |
| ----------------------------- | ----------------- | --------------------------- |
| `RESTATE_VERSION` | `1.5.3` | Restate server version |
| `RESTATE_CLUSTER_NAME` | `restate-cluster` | Cluster name |
| `RESTATE_DEFAULT_REPLICATION` | `2` | Minimum replicas for writes |
### Port Configuration
Each node has three ports:
- `NODEx_INGRESS_PORT_OVERRIDE`: Ingress API port
- `NODEx_ADMIN_PORT_OVERRIDE`: Admin API port
- `NODEx_NODE_PORT_OVERRIDE`: Node-to-node communication port
### Snapshot Configuration
| Variable | Default | Description |
| ---------------------------------------------------------- | ------------------------ | -------------------- |
| `RESTATE_WORKER__SNAPSHOTS__DESTINATION` | `s3://restate/snapshots` | S3 bucket path |
| `RESTATE_WORKER__SNAPSHOTS__SNAPSHOT_INTERVAL_NUM_RECORDS` | `1000` | Records per snapshot |
| `RESTATE_WORKER__SNAPSHOTS__AWS_ENDPOINT_URL` | `http://minio:9000` | S3 endpoint |
### MinIO Configuration
| Variable | Default | Description |
| ----------------------------- | ------------ | -------------------- |
| `MINIO_VERSION` | `latest` | MinIO version |
| `MINIO_ROOT_USER` | `minioadmin` | MinIO admin username |
| `MINIO_ROOT_PASSWORD` | `minioadmin` | MinIO admin password |
| `MINIO_API_PORT_OVERRIDE` | `9000` | MinIO API port |
| `MINIO_CONSOLE_PORT_OVERRIDE` | `9001` | MinIO console port |
## Usage Examples
### Deploy a Service (to any node)
```bash
# Deploy to node 1
curl -X POST http://localhost:9070/deployments \
-H 'Content-Type: application/json' \
-d '{"uri": "http://my-service:9080"}'
```
### Invoke Service with Load Balancing
Use a load balancer or DNS round-robin across ingress endpoints:
```bash
# Node 1
curl -X POST http://localhost:8080/MyService/myMethod \
-H 'Content-Type: application/json' \
-d '{"key": "value"}'
# Node 2
curl -X POST http://localhost:28080/MyService/myMethod \
-H 'Content-Type: application/json' \
-d '{"key": "value"}'
```
### Check Cluster Status
```bash
# From any admin API
curl http://localhost:9070/cluster
```
## Fault Tolerance
The cluster is configured with:
- **Replication Factor**: 2 (data written to 2 out of 3 nodes)
- **Quorum**: Requires majority (2/3 nodes) for metadata operations
- **Tolerance**: Can survive 1 node failure without downtime
### Testing Failover
Stop one node:
```bash
docker compose stop restate-2
```
The cluster continues to operate. Services remain available on nodes 1 and 3.
## Snapshots and Backups
Partition snapshots are automatically saved to MinIO every 1000 records. This enables:
- Fast recovery after failures
- Backup and restore capabilities
- Reduced replay time on node restart
### Viewing Snapshots
Access MinIO console at `http://localhost:9001`:
1. Login with `minioadmin` / `minioadmin`
2. Navigate to `restate` bucket
3. Browse `snapshots/` directory
### Backup Strategy
To backup cluster data:
1. Stop the cluster:
```bash
docker compose down
```
2. Backup volumes:
```bash
docker run --rm -v restate-cluster_restate_data:/data -v $(pwd)/backup:/backup alpine tar czf /backup/restate-data.tar.gz -C /data .
docker run --rm -v restate-cluster_minio_data:/data -v $(pwd)/backup:/backup alpine tar czf /backup/minio-data.tar.gz -C /data .
```
## Resource Limits
### Per Restate Node
- CPU: 0.5-2.0 cores
- Memory: 512MB-2GB
### MinIO Instance
- CPU: 0.25-1.0 cores
- Memory: 128MB-512MB
Adjust based on workload in `docker-compose.yaml`.
## Scaling
To add more nodes:
1. Add new service in `docker-compose.yaml`
2. Set unique `RESTATE_NODE_NAME` and `RESTATE_FORCE_NODE_ID`
3. Add node address to `RESTATE_METADATA_CLIENT__ADDRESSES`
4. Expose unique ports
5. Set `RESTATE_AUTO_PROVISION=false`
## Production Considerations
- **Storage**: Use durable storage for volumes (EBS, persistent disks)
- **Network**: Ensure low latency between nodes (<10ms)
- **Monitoring**: Set up Prometheus scraping on port 9070
- **Security**: Change MinIO credentials in production
- **Replication**: Adjust `RESTATE_DEFAULT_REPLICATION` based on cluster size
- **Snapshots**: Consider external S3 for snapshot storage
## Monitoring
Each node exposes metrics:
```bash
curl http://localhost:9070/metrics # Node 1
curl http://localhost:29070/metrics # Node 2
curl http://localhost:39070/metrics # Node 3
```
## Troubleshooting
### Node Won't Start
Check logs:
```bash
docker compose logs restate-1
```
Ensure all nodes can reach each other on port 5122.
### Split Brain Prevention
The cluster uses raft consensus with majority quorum. If nodes become partitioned, only the partition with majority (2+ nodes) remains active.
### Data Recovery
If data is corrupted:
1. Stop cluster
2. Restore from volume backups
3. Restart cluster
## Documentation
- [Official Documentation](https://docs.restate.dev/)
- [Cluster Deployment Guide](https://docs.restate.dev/server/clusters)
- [Snapshots Documentation](https://docs.restate.dev/server/snapshots)
- [Configuration Reference](https://docs.restate.dev/references/server-config)
## License
This configuration is provided under the project's license. Restate is licensed under the [Business Source License 1.1](https://github.com/restatedev/restate/blob/main/LICENSE).
## Notes
- For single-node deployments, see [restate](../restate/)
- MinIO is used for demo purposes; use AWS S3/compatible storage in production
- The cluster automatically provisions on first start
- Node IDs are pinned to ensure consistent identity across restarts

View File

@@ -0,0 +1,280 @@
# Restate 多节点集群
用于生产工作负载的高可用 3 节点 Restate 集群。此配置提供容错和自动故障转移功能。
## 特性
- **高可用性**3 节点集群可以容忍 1 个节点故障
- **数据复制**可配置的复制因子默认3 个节点中的 2 个)
- **自动快照**:定期快照存储在 MinIOS3 兼容)中
- **负载分配**:用于负载均衡的多个入口端点
- **元数据仲裁**:用于一致性的复制元数据集群
## 快速开始
1. 复制环境变量文件:
```bash
cp .env.example .env
```
2. 启动集群:
```bash
docker compose up -d
```
3. 验证集群健康状态:
```bash
# 检查节点 1
curl http://localhost:9070/health
# 检查节点 2
curl http://localhost:29070/health
# 检查节点 3
curl http://localhost:39070/health
```
## 架构
集群由以下部分组成:
- **3 个 Restate 节点**:具有复制状态的分布式工作流引擎
- **MinIO**:用于分区快照的 S3 兼容存储
- **Replicated Bifrost Provider**:跨节点的日志复制
- **元数据集群**:所有节点上的分布式元数据服务器
## 服务端点
### 节点 1主节点
- Ingress API`http://localhost:8080`
- Admin API`http://localhost:9070`
- 节点通信:端口 5122
### 节点 2
- Ingress API`http://localhost:28080`
- Admin API`http://localhost:29070`
- 节点通信:端口 25122
### 节点 3
- Ingress API`http://localhost:38080`
- Admin API`http://localhost:39070`
- 节点通信:端口 35122
### MinIO
- API`http://localhost:9000`
- 控制台:`http://localhost:9001`(管理 UI
- 用户名:`minioadmin`
- 密码:`minioadmin`
## 环境变量
### 集群配置
| 变量 | 默认值 | 说明 |
| ----------------------------- | ----------------- | -------------------- |
| `RESTATE_VERSION` | `1.5.3` | Restate 服务器版本 |
| `RESTATE_CLUSTER_NAME` | `restate-cluster` | 集群名称 |
| `RESTATE_DEFAULT_REPLICATION` | `2` | 写入所需的最小副本数 |
### 端口配置
每个节点有三个端口:
- `NODEx_INGRESS_PORT_OVERRIDE`Ingress API 端口
- `NODEx_ADMIN_PORT_OVERRIDE`Admin API 端口
- `NODEx_NODE_PORT_OVERRIDE`:节点间通信端口
### 快照配置
| 变量 | 默认值 | 说明 |
| ---------------------------------------------------------- | ------------------------ | ---------------- |
| `RESTATE_WORKER__SNAPSHOTS__DESTINATION` | `s3://restate/snapshots` | S3 存储桶路径 |
| `RESTATE_WORKER__SNAPSHOTS__SNAPSHOT_INTERVAL_NUM_RECORDS` | `1000` | 每个快照的记录数 |
| `RESTATE_WORKER__SNAPSHOTS__AWS_ENDPOINT_URL` | `http://minio:9000` | S3 端点 |
### MinIO 配置
| 变量 | 默认值 | 说明 |
| ----------------------------- | ------------ | ------------------ |
| `MINIO_VERSION` | `latest` | MinIO 版本 |
| `MINIO_ROOT_USER` | `minioadmin` | MinIO 管理员用户名 |
| `MINIO_ROOT_PASSWORD` | `minioadmin` | MinIO 管理员密码 |
| `MINIO_API_PORT_OVERRIDE` | `9000` | MinIO API 端口 |
| `MINIO_CONSOLE_PORT_OVERRIDE` | `9001` | MinIO 控制台端口 |
## 使用示例
### 部署服务(到任何节点)
```bash
# 部署到节点 1
curl -X POST http://localhost:9070/deployments \
-H 'Content-Type: application/json' \
-d '{"uri": "http://my-service:9080"}'
```
### 使用负载均衡调用服务
使用负载均衡器或 DNS 轮询跨入口端点:
```bash
# 节点 1
curl -X POST http://localhost:8080/MyService/myMethod \
-H 'Content-Type: application/json' \
-d '{"key": "value"}'
# 节点 2
curl -X POST http://localhost:28080/MyService/myMethod \
-H 'Content-Type: application/json' \
-d '{"key": "value"}'
```
### 检查集群状态
```bash
# 从任何管理 API
curl http://localhost:9070/cluster
```
## 容错能力
集群配置为:
- **复制因子**2数据写入 3 个节点中的 2 个)
- **仲裁**元数据操作需要多数2/3 节点)
- **容错能力**:可以在不停机的情况下容忍 1 个节点故障
### 测试故障转移
停止一个节点:
```bash
docker compose stop restate-2
```
集群继续运行。服务在节点 1 和 3 上仍然可用。
## 快照和备份
分区快照每 1000 条记录自动保存到 MinIO。这使得
- 故障后快速恢复
- 备份和恢复功能
- 减少节点重启时的重放时间
### 查看快照
在 `http://localhost:9001` 访问 MinIO 控制台:
1. 使用 `minioadmin` / `minioadmin` 登录
2. 导航到 `restate` 存储桶
3. 浏览 `snapshots/` 目录
### 备份策略
要备份集群数据:
1. 停止集群:
```bash
docker compose down
```
2. 备份卷:
```bash
docker run --rm -v restate-cluster_restate_data:/data -v $(pwd)/backup:/backup alpine tar czf /backup/restate-data.tar.gz -C /data .
docker run --rm -v restate-cluster_minio_data:/data -v $(pwd)/backup:/backup alpine tar czf /backup/minio-data.tar.gz -C /data .
```
## 资源限制
### 每个 Restate 节点
- CPU0.5-2.0 核心
- 内存512MB-2GB
### MinIO 实例
- CPU0.25-1.0 核心
- 内存128MB-512MB
根据 `docker-compose.yaml` 中的工作负载进行调整。
## 扩展
要添加更多节点:
1. 在 `docker-compose.yaml` 中添加新服务
2. 设置唯一的 `RESTATE_NODE_NAME` 和 `RESTATE_FORCE_NODE_ID`
3. 将节点地址添加到 `RESTATE_METADATA_CLIENT__ADDRESSES`
4. 暴露唯一端口
5. 设置 `RESTATE_AUTO_PROVISION=false`
## 生产注意事项
- **存储**使用持久存储卷EBS、持久磁盘
- **网络**:确保节点之间的低延迟(<10ms
- **监控**:在端口 9070 上设置 Prometheus 抓取
- **安全**:在生产环境中更改 MinIO 凭据
- **复制**:根据集群大小调整 `RESTATE_DEFAULT_REPLICATION`
- **快照**:考虑使用外部 S3 进行快照存储
## 监控
每个节点都公开指标:
```bash
curl http://localhost:9070/metrics # 节点 1
curl http://localhost:29070/metrics # 节点 2
curl http://localhost:39070/metrics # 节点 3
```
## 故障排除
### 节点无法启动
检查日志:
```bash
docker compose logs restate-1
```
确保所有节点可以在端口 5122 上相互访问。
### 防止脑裂
集群使用 raft 共识和多数仲裁。如果节点被分区只有具有多数2+ 节点)的分区保持活动状态。
### 数据恢复
如果数据损坏:
1. 停止集群
2. 从卷备份恢复
3. 重启集群
## 文档
- [官方文档](https://docs.restate.dev/)
- [集群部署指南](https://docs.restate.dev/server/clusters)
- [快照文档](https://docs.restate.dev/server/snapshots)
- [配置参考](https://docs.restate.dev/references/server-config)
## 许可证
此配置在项目许可证下提供。Restate 采用 [Business Source License 1.1](https://github.com/restatedev/restate/blob/main/LICENSE) 许可。
## 注意事项
- 对于单节点部署,请参见 [restate](../restate/)
- MinIO 用于演示目的;在生产环境中使用 AWS S3/兼容存储
- 集群在首次启动时自动配置
- 节点 ID 被固定以确保重启时的一致标识

View File

@@ -0,0 +1,144 @@
# Restate Multi-Node Cluster
# A highly-available distributed workflow engine with 3-node cluster
# Documentation: https://docs.restate.dev/server/clusters
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
options:
max-size: 100m
max-file: "3"
x-environment: &common-env
TZ: ${TZ:-UTC}
RESTATE_CLUSTER_NAME: ${RESTATE_CLUSTER_NAME:-restate-cluster}
RESTATE_LOG_FILTER: ${RESTATE_LOG_FILTER:-restate=info}
# Minimum replicas required to accept writes (2 out of 3 nodes)
RESTATE_DEFAULT_REPLICATION: ${RESTATE_DEFAULT_REPLICATION:-2}
# Addresses where nodes can reach each other
RESTATE_METADATA_CLIENT__ADDRESSES: ${RESTATE_METADATA_CLIENT__ADDRESSES:-["http://restate-1:5122","http://restate-2:5122","http://restate-3:5122"]}
# Snapshot configuration
RESTATE_WORKER__SNAPSHOTS__DESTINATION: ${RESTATE_WORKER__SNAPSHOTS__DESTINATION:-s3://restate/snapshots}
RESTATE_WORKER__SNAPSHOTS__SNAPSHOT_INTERVAL_NUM_RECORDS: ${RESTATE_WORKER__SNAPSHOTS__SNAPSHOT_INTERVAL_NUM_RECORDS:-1000}
RESTATE_WORKER__SNAPSHOTS__AWS_REGION: ${RESTATE_WORKER__SNAPSHOTS__AWS_REGION:-local}
RESTATE_WORKER__SNAPSHOTS__AWS_ENDPOINT_URL: ${RESTATE_WORKER__SNAPSHOTS__AWS_ENDPOINT_URL:-http://minio:9000}
RESTATE_WORKER__SNAPSHOTS__AWS_ALLOW_HTTP: ${RESTATE_WORKER__SNAPSHOTS__AWS_ALLOW_HTTP:-true}
RESTATE_WORKER__SNAPSHOTS__AWS_ACCESS_KEY_ID: ${MINIO_ROOT_USER:-minioadmin}
RESTATE_WORKER__SNAPSHOTS__AWS_SECRET_ACCESS_KEY: ${MINIO_ROOT_PASSWORD:-minioadmin}
x-restate: &restate-defaults
<<: *defaults
image: restatedev/restate:${RESTATE_VERSION:-1.5.3}
volumes:
- restate_data:/restate-data
deploy:
resources:
limits:
cpus: '2.00'
memory: 2G
reservations:
cpus: '0.50'
memory: 512M
services:
restate-1:
<<: *restate-defaults
ports:
- "${NODE1_INGRESS_PORT_OVERRIDE:-8080}:8080" # Ingress API
- "${NODE1_ADMIN_PORT_OVERRIDE:-9070}:9070" # Admin API
- "${NODE1_NODE_PORT_OVERRIDE:-5122}:5122" # Node-to-node
environment:
<<: *common-env
RESTATE_NODE_NAME: restate-1
RESTATE_FORCE_NODE_ID: 1
RESTATE_ADVERTISED_ADDRESS: ${RESTATE_NODE1_ADVERTISED_ADDRESS:-http://restate-1:5122}
RESTATE_AUTO_PROVISION: "true" # Only first node provisions cluster
healthcheck:
test: ["CMD", "sh", "-c", "wget --no-verbose --tries=1 --spider http://localhost:9070/health || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
depends_on:
minio:
condition: service_healthy
restate-2:
<<: *restate-defaults
ports:
- "${NODE2_INGRESS_PORT_OVERRIDE:-28080}:8080"
- "${NODE2_ADMIN_PORT_OVERRIDE:-29070}:9070"
- "${NODE2_NODE_PORT_OVERRIDE:-25122}:5122"
environment:
<<: *common-env
RESTATE_NODE_NAME: restate-2
RESTATE_FORCE_NODE_ID: 2
RESTATE_ADVERTISED_ADDRESS: ${RESTATE_NODE2_ADVERTISED_ADDRESS:-http://restate-2:5122}
RESTATE_AUTO_PROVISION: "false"
healthcheck:
test: ["CMD", "sh", "-c", "wget --no-verbose --tries=1 --spider http://localhost:9070/health || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
depends_on:
minio:
condition: service_healthy
restate-1:
condition: service_healthy
restate-3:
<<: *restate-defaults
ports:
- "${NODE3_INGRESS_PORT_OVERRIDE:-38080}:8080"
- "${NODE3_ADMIN_PORT_OVERRIDE:-39070}:9070"
- "${NODE3_NODE_PORT_OVERRIDE:-35122}:5122"
environment:
<<: *common-env
RESTATE_NODE_NAME: restate-3
RESTATE_FORCE_NODE_ID: 3
RESTATE_ADVERTISED_ADDRESS: ${RESTATE_NODE3_ADVERTISED_ADDRESS:-http://restate-3:5122}
RESTATE_AUTO_PROVISION: "false"
healthcheck:
test: ["CMD", "sh", "-c", "wget --no-verbose --tries=1 --spider http://localhost:9070/health || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
depends_on:
minio:
condition: service_healthy
restate-1:
condition: service_healthy
minio:
<<: *defaults
image: quay.io/minio/minio:${MINIO_VERSION:-latest}
command: ["sh", "-c", "mkdir -p /data/restate && /usr/bin/minio server --quiet /data --console-address :9001"]
ports:
- "${MINIO_API_PORT_OVERRIDE:-9000}:9000"
- "${MINIO_CONSOLE_PORT_OVERRIDE:-9001}:9001"
environment:
- MINIO_ROOT_USER=${MINIO_ROOT_USER:-minioadmin}
- MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD:-minioadmin}
volumes:
- minio_data:/data
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
deploy:
resources:
limits:
cpus: '1.00'
memory: 512M
reservations:
cpus: '0.25'
memory: 128M
volumes:
restate_data:
minio_data:

13
src/restate/.env.example Normal file
View File

@@ -0,0 +1,13 @@
# Restate version
RESTATE_VERSION=1.5.3
# Port overrides (host:container)
INGRESS_PORT_OVERRIDE=8080
ADMIN_PORT_OVERRIDE=9070
NODE_PORT_OVERRIDE=5122
# Timezone
TZ=UTC
# Log level: trace, debug, info, warn, error
RESTATE_LOG_FILTER=restate=info

122
src/restate/README.md Normal file
View File

@@ -0,0 +1,122 @@
# Restate Single-Node Server
Restate is a distributed workflow engine for stateful services that provides durable execution, reliable messaging, and state management out of the box.
## Features
- **Durable Execution**: Automatically persist execution state and resume on failures
- **Reliable Messaging**: Built-in message delivery guarantees
- **State Management**: Strongly consistent state with minimal overhead
- **Service Discovery**: Automatic service registration and discovery
- **Admin API**: Rich API for monitoring and managing services
## Quick Start
1. Copy environment file:
```bash
cp .env.example .env
```
2. Start the service:
```bash
docker compose up -d
```
3. Verify the service is running:
```bash
curl http://localhost:9070/health
```
## Service Endpoints
- **Ingress API**: `http://localhost:8080` - Main API for invoking services
- **Admin API**: `http://localhost:9070` - Management and monitoring API
- **Node Communication**: Port 5122 (internal)
## Environment Variables
| Variable | Default | Description |
| ----------------------- | -------------- | --------------------------------------- |
| `RESTATE_VERSION` | `1.5.3` | Restate server version |
| `INGRESS_PORT_OVERRIDE` | `8080` | Ingress API port |
| `ADMIN_PORT_OVERRIDE` | `9070` | Admin API port |
| `NODE_PORT_OVERRIDE` | `5122` | Node-to-node communication port |
| `RESTATE_LOG_FILTER` | `restate=info` | Log level (trace/debug/info/warn/error) |
| `TZ` | `UTC` | Timezone |
## Usage Examples
### Deploy a Service
```bash
# Register a service endpoint
curl -X POST http://localhost:9070/deployments \
-H 'Content-Type: application/json' \
-d '{"uri": "http://my-service:9080"}'
```
### List Deployed Services
```bash
curl http://localhost:9070/services
```
### Invoke a Service
```bash
curl -X POST http://localhost:8080/MyService/myMethod \
-H 'Content-Type: application/json' \
-d '{"key": "value"}'
```
## Data Persistence
Restate data is stored in the named volume `restate_data`. The server uses node name `restate-1` for data consistency across restarts.
To reset the server and start fresh:
```bash
docker compose down -v
```
## Resource Limits
- CPU: 0.5-2.0 cores
- Memory: 512MB-2GB
Adjust these limits in `docker-compose.yaml` based on your workload.
## Monitoring
Check server health:
```bash
curl http://localhost:9070/health
```
View server metrics (Prometheus format):
```bash
curl http://localhost:9070/metrics
```
## Documentation
- [Official Documentation](https://docs.restate.dev/)
- [Deployment Guide](https://docs.restate.dev/server/deploy/docker)
- [Configuration Reference](https://docs.restate.dev/references/server-config)
- [Architecture](https://docs.restate.dev/references/architecture)
## License
This configuration is provided under the project's license. Restate is licensed under the [Business Source License 1.1](https://github.com/restatedev/restate/blob/main/LICENSE).
## Notes
- For production deployments, consider using a [Restate cluster](../restate-cluster/) for high availability
- Ensure the data directory is on durable storage in production
- The `--node-name` flag ensures consistent data restoration across restarts
- For cluster deployments, see the [restate-cluster](../restate-cluster/) configuration

122
src/restate/README.zh.md Normal file
View File

@@ -0,0 +1,122 @@
# Restate 单节点服务器
Restate 是一个用于有状态服务的分布式工作流引擎,提供开箱即用的持久化执行、可靠消息传递和状态管理。
## 特性
- **持久化执行**:自动持久化执行状态并在失败时恢复
- **可靠消息传递**:内置消息传递保证
- **状态管理**:具有最小开销的强一致性状态
- **服务发现**:自动服务注册和发现
- **管理 API**:丰富的监控和管理服务 API
## 快速开始
1. 复制环境变量文件:
```bash
cp .env.example .env
```
2. 启动服务:
```bash
docker compose up -d
```
3. 验证服务运行:
```bash
curl http://localhost:9070/health
```
## 服务端点
- **Ingress API**`http://localhost:8080` - 调用服务的主要 API
- **Admin API**`http://localhost:9070` - 管理和监控 API
- **节点通信**:端口 5122内部
## 环境变量
| 变量 | 默认值 | 说明 |
| ----------------------- | -------------- | --------------------------------------- |
| `RESTATE_VERSION` | `1.5.3` | Restate 服务器版本 |
| `INGRESS_PORT_OVERRIDE` | `8080` | Ingress API 端口 |
| `ADMIN_PORT_OVERRIDE` | `9070` | Admin API 端口 |
| `NODE_PORT_OVERRIDE` | `5122` | 节点间通信端口 |
| `RESTATE_LOG_FILTER` | `restate=info` | 日志级别trace/debug/info/warn/error |
| `TZ` | `UTC` | 时区 |
## 使用示例
### 部署服务
```bash
# 注册服务端点
curl -X POST http://localhost:9070/deployments \
-H 'Content-Type: application/json' \
-d '{"uri": "http://my-service:9080"}'
```
### 列出已部署的服务
```bash
curl http://localhost:9070/services
```
### 调用服务
```bash
curl -X POST http://localhost:8080/MyService/myMethod \
-H 'Content-Type: application/json' \
-d '{"key": "value"}'
```
## 数据持久化
Restate 数据存储在命名卷 `restate_data` 中。服务器使用节点名称 `restate-1` 以确保重启时的数据一致性。
要重置服务器并重新开始:
```bash
docker compose down -v
```
## 资源限制
- CPU0.5-2.0 核心
- 内存512MB-2GB
根据工作负载在 `docker-compose.yaml` 中调整这些限制。
## 监控
检查服务器健康状态:
```bash
curl http://localhost:9070/health
```
查看服务器指标Prometheus 格式):
```bash
curl http://localhost:9070/metrics
```
## 文档
- [官方文档](https://docs.restate.dev/)
- [部署指南](https://docs.restate.dev/server/deploy/docker)
- [配置参考](https://docs.restate.dev/references/server-config)
- [架构](https://docs.restate.dev/references/architecture)
## 许可证
此配置在项目许可证下提供。Restate 采用 [Business Source License 1.1](https://github.com/restatedev/restate/blob/main/LICENSE) 许可。
## 注意事项
- 对于生产部署,考虑使用 [Restate 集群](../restate-cluster/) 以实现高可用性
- 在生产环境中确保数据目录位于持久存储上
- `--node-name` 参数确保重启时的一致数据恢复
- 对于集群部署,请参见 [restate-cluster](../restate-cluster/) 配置

View File

@@ -0,0 +1,43 @@
# Restate Single-Node Server
# A distributed workflow engine for stateful services
# Documentation: https://docs.restate.dev/
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
options:
max-size: 100m
max-file: "3"
services:
restate:
<<: *defaults
image: restatedev/restate:${RESTATE_VERSION:-1.5.3}
command: ["--node-name=restate-1"]
ports:
- "${INGRESS_PORT_OVERRIDE:-8080}:8080" # Ingress API
- "${ADMIN_PORT_OVERRIDE:-9070}:9070" # Admin API
- "${NODE_PORT_OVERRIDE:-5122}:5122" # Node-to-node communication
volumes:
- restate_data:/restate-data
environment:
- TZ=${TZ:-UTC}
- RESTATE_LOG_FILTER=${RESTATE_LOG_FILTER:-restate=info}
healthcheck:
test: ["CMD", "sh", "-c", "wget --no-verbose --tries=1 --spider http://localhost:9070/health || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
deploy:
resources:
limits:
cpus: '2.00'
memory: 2G
reservations:
cpus: '0.50'
memory: 512M
volumes:
restate_data:

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
namesrv:
<<: *default
<<: *defaults
image: apache/rocketmq:${ROCKETMQ_VERSION:-5.3.1}
command: sh mqnamesrv
environment:
@@ -34,7 +34,7 @@ services:
start_period: 30s
broker:
<<: *default
<<: *defaults
image: apache/rocketmq:${ROCKETMQ_VERSION:-5.3.1}
command: sh mqbroker -n namesrv:9876 -c /home/rocketmq/broker.conf
environment:
@@ -67,7 +67,7 @@ services:
start_period: 30s
dashboard:
<<: *default
<<: *defaults
image: apacherocketmq/rocketmq-dashboard:${ROCKETMQ_DASHBOARD_VERSION:-2.0.0}
environment:
TZ: ${TZ:-UTC}

View File

@@ -1,5 +1,5 @@
# https://github.com/searxng/searxng-docker/blob/master/docker-compose.yaml
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -9,7 +9,7 @@ x-default: &default
services:
caddy:
<<: *default
<<: *defaults
image: docker.io/library/caddy:${CADDY_VERSION:-2-alpine}
network_mode: host
volumes:
@@ -40,7 +40,7 @@ services:
memory: 64M
redis:
<<: *default
<<: *defaults
image: docker.io/valkey/valkey:${VALKEY_VERSION:-8-alpine}
command: valkey-server --save 30 1 --loglevel warning
networks:
@@ -69,7 +69,7 @@ services:
memory: 64M
searxng:
<<: *default
<<: *defaults
image: docker.io/searxng/searxng:${SEARXNG_VERSION:-2025.1.20-1ce14ef99}
networks:
- searxng

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
stable-diffusion-webui:
<<: *default
<<: *defaults
image: ghcr.io/absolutelyludicrous/sdnext:${SD_WEBUI_VERSION:-latest}
ports:
- "${SD_WEBUI_PORT_OVERRIDE:-7860}:7860"

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
stirling-pdf:
<<: *default
<<: *defaults
image: stirlingtools/stirling-pdf:${STIRLING_VERSION:-latest}
ports:
- "${PORT_OVERRIDE:-8080}:8080"

View File

@@ -26,7 +26,7 @@
#
# License: MIT (https://github.com/temporalio/temporal/blob/master/LICENSE)
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -36,7 +36,7 @@ x-default: &default
services:
temporal:
<<: *default
<<: *defaults
image: temporalio/auto-setup:${TEMPORAL_VERSION:-1.24.2}
container_name: temporal
ports:
@@ -84,7 +84,7 @@ services:
memory: "${TEMPORAL_MEMORY_RESERVATION:-512M}"
temporal-ui:
<<: *default
<<: *defaults
image: temporalio/ui:${TEMPORAL_UI_VERSION:-2.28.0}
container_name: temporal-ui
ports:
@@ -113,7 +113,7 @@ services:
memory: "${TEMPORAL_UI_MEMORY_RESERVATION:-128M}"
temporal-admin-tools:
<<: *default
<<: *defaults
image: temporalio/admin-tools:${TEMPORAL_VERSION:-1.24.2}
container_name: temporal-admin-tools
profiles:
@@ -137,7 +137,7 @@ services:
memory: "256M"
postgres:
<<: *default
<<: *defaults
image: postgres:${POSTGRES_VERSION:-16-alpine}
container_name: temporal-postgres
environment:

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
pd:
<<: *default
<<: *defaults
image: pingcap/pd:${TIDB_VERSION:-v8.5.0}
command:
- --name=pd
@@ -39,7 +39,7 @@ services:
start_period: 30s
tikv:
<<: *default
<<: *defaults
image: pingcap/tikv:${TIDB_VERSION:-v8.5.0}
command:
- --addr=0.0.0.0:20160
@@ -71,7 +71,7 @@ services:
start_period: 60s
tidb:
<<: *default
<<: *defaults
image: pingcap/tidb:${TIDB_VERSION:-v8.5.0}
command:
- --store=tikv

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -8,7 +8,7 @@ x-default: &default
services:
pd:
<<: *default
<<: *defaults
image: pingcap/pd:${TIKV_VERSION:-v8.5.0}
command:
- --name=pd
@@ -40,7 +40,7 @@ services:
start_period: 30s
tikv:
<<: *default
<<: *defaults
image: pingcap/tikv:${TIKV_VERSION:-v8.5.0}
command:
- --addr=0.0.0.0:20160

View File

@@ -1,4 +1,4 @@
x-default: &default
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
@@ -7,7 +7,7 @@ x-default: &default
max-file: "3"
x-valkey-node: &valkey-node
<<: *default
<<: *defaults
image: valkey/valkey:${VALKEY_VERSION:-8.0-alpine}
environment:
- TZ=${TZ:-UTC}
@@ -90,7 +90,7 @@ services:
- valkey_data_6:/data
valkey-cluster-init:
<<: *default
<<: *defaults
image: valkey/valkey:${VALKEY_VERSION:-8.0-alpine}
environment:
- TZ=${TZ:-UTC}

Some files were not shown because too many files have changed in this diff Show More