mirror of
https://github.com/go-sigma/sigma.git
synced 2026-10-28 16:34:34 +08:00
The rs3 server binary never reads RS3_ENDPOINT; it is a client-only setting for rs3-cli, which only the old healthcheck used. Switch the rs3 healthcheck to `curl --fail .../readyz` with a start period (matching scripts/run_rs3.sh and CI) and remove the now-dead RS3_ENDPOINT from compose.yml, the demo-server compose, run_rs3.sh, and the test workflow. Verification: - git grep RS3_ENDPOINT -> no matches - docker compose config for compose.yml and tools/demo-server/compose.yml
88 lines
2.2 KiB
YAML
88 lines
2.2 KiB
YAML
# yaml-language-server: $schema=https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json
|
|
services:
|
|
sigma:
|
|
container_name: sigma
|
|
image: ghcr.io/go-sigma/sigma:nightly
|
|
ports:
|
|
- "3000:3000"
|
|
command: ["sigma", "server", "-c", "/etc/sigma/config-compose.yaml"]
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- ${PWD}/conf:/etc/sigma
|
|
healthcheck:
|
|
test: ["CMD", "curl", "--fail", "-s", "http://localhost:3000/healthz"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 10
|
|
restart: always
|
|
depends_on:
|
|
postgresql:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
rs3:
|
|
condition: service_healthy
|
|
networks:
|
|
- default
|
|
postgresql:
|
|
container_name: postgresql
|
|
image: postgres:16-alpine
|
|
ports:
|
|
- "5432:5432"
|
|
environment:
|
|
POSTGRES_PASSWORD: sigma
|
|
POSTGRES_USER: sigma
|
|
POSTGRES_DB: sigma
|
|
volumes:
|
|
- ${PWD}/storage/postgresql:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U sigma -d sigma || exit 1"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 10
|
|
networks:
|
|
- default
|
|
redis:
|
|
container_name: redis
|
|
image: redis:8.0-alpine
|
|
ports:
|
|
- "6379:6379"
|
|
command: redis-server --requirepass sigma
|
|
volumes:
|
|
- ${PWD}/storage/redis:/data
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "-a", "sigma", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 10
|
|
networks:
|
|
- default
|
|
rs3:
|
|
container_name: rs3
|
|
image: ghcr.io/go-sigma/rs3:nightly
|
|
ports:
|
|
- "9000:9000"
|
|
environment:
|
|
RS3_HOST: 0.0.0.0
|
|
RS3_PORT: 9000
|
|
RS3_DATA_DIR: /var/lib/rs3/data
|
|
RS3_ACCESS_KEY: sigma
|
|
RS3_SECRET_KEY: sigma-sigma
|
|
entrypoint:
|
|
- /bin/sh
|
|
- -c
|
|
- mkdir -p /var/lib/rs3/data/sigma && exec rs3
|
|
volumes:
|
|
- ${PWD}/storage/rs3:/var/lib/rs3/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "curl --fail http://127.0.0.1:$$RS3_PORT/readyz || exit 1"]
|
|
interval: 30s
|
|
timeout: 3s
|
|
start_period: 5s
|
|
retries: 3
|
|
networks:
|
|
- default
|
|
networks:
|
|
default:
|
|
name: ${DOCKER_NETWORK:-sigma}
|