refactor(docker): optimize Docker build process and update configurations
- Replace direct Rust build with cargo-chef multi-stage build pattern - Switch base image from debian:bookworm-slim to ubuntu:26.04 - Add .codegraph to .dockerignore and data to .gitignore - Introduce Dockerfile.fast for faster builds without optimization - Add comprehensive .env configuration file with cluster settings - Create docker-compose.yaml for multi-node cluster setup - Add cluster routing test case for distributed operations - Remove unnecessary success status checks in repository maintenance - Fix error handling in git command executions by properly propagating errors - Add repository move protection to prevent self-destruct operations - Simplify conditional logic in actor message validation - Update remote pack client calls with proper error handling parameters
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
x-gitks-common: &gitks-common
|
||||
image: gitks
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
RUST_LOG: info
|
||||
REPO_PREFIX_PATH: /data/repos
|
||||
GITKS_HOST: 0.0.0.0
|
||||
GITKS_PORT: 50051
|
||||
GITKS_METRICS_PORT: 9100
|
||||
GITKS_CLUSTER_PORT: 4697
|
||||
GITKS_ETCD_ENDPOINTS: "http://etcd:2379"
|
||||
GITKS_LEASE_TTL: 15
|
||||
GITKS_ETCD_CONNECT_TIMEOUT: 5000
|
||||
GITKS_HEALTH_CHECK_INTERVAL: 1
|
||||
GITKS_MAX_HEALTH_FAILURES: 10
|
||||
GITKS_DISK_CACHE_ENABLED: "false"
|
||||
GITKS_PACK_CACHE_ENABLED: "false"
|
||||
GITKS_HOOKS_ENABLED: "true"
|
||||
GITKS_HOOK_TIMEOUT: 30
|
||||
GITKS_ALLOW_CUSTOM_HOOKS: "true"
|
||||
GITKS_RATE_LIMIT_MAX_CONCURRENT: 200
|
||||
volumes:
|
||||
- repo_data:/data/repos
|
||||
networks:
|
||||
- etcd_default
|
||||
|
||||
services:
|
||||
gitks-1:
|
||||
<<: *gitks-common
|
||||
ports:
|
||||
- "50051:50051"
|
||||
- "9101:9100"
|
||||
environment:
|
||||
GITKS_ETCD_ENDPOINTS: "http://etcd:2379"
|
||||
GITKS_CLUSTER_HOSTNAME: gitks-1
|
||||
STORAGE_NAME: gitks-1
|
||||
GITKS_ADVERTISE_ADDR: http://gitks-1:50051
|
||||
|
||||
gitks-2:
|
||||
<<: *gitks-common
|
||||
ports:
|
||||
- "50052:50051"
|
||||
- "9102:9100"
|
||||
environment:
|
||||
GITKS_ETCD_ENDPOINTS: "http://etcd:2379"
|
||||
GITKS_CLUSTER_HOSTNAME: gitks-2
|
||||
STORAGE_NAME: gitks-2
|
||||
GITKS_ADVERTISE_ADDR: http://gitks-2:50051
|
||||
|
||||
gitks-3:
|
||||
<<: *gitks-common
|
||||
ports:
|
||||
- "50053:50051"
|
||||
- "9103:9100"
|
||||
environment:
|
||||
GITKS_ETCD_ENDPOINTS: "http://etcd:2379"
|
||||
GITKS_CLUSTER_HOSTNAME: gitks-3
|
||||
STORAGE_NAME: gitks-3
|
||||
GITKS_ADVERTISE_ADDR: http://gitks-3:50051
|
||||
|
||||
volumes:
|
||||
repo_data:
|
||||
|
||||
networks:
|
||||
etcd_default:
|
||||
external: true
|
||||
Reference in New Issue
Block a user