name: tyrs-hand services: postgres: image: postgres:18.3-bookworm@sha256:80630f83606d8db77d30b3851b16a9f78be2d0d4dda6f7b82a1fdca5ebe3acba environment: POSTGRES_DB: tyrs_hand POSTGRES_USER: tyrs_hand POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password secrets: [postgres_password] volumes: - postgres-data:/var/lib/postgresql healthcheck: test: ["CMD-SHELL", "pg_isready -U tyrs_hand -d tyrs_hand"] interval: 5s timeout: 3s retries: 20 restart: unless-stopped redis: image: redis:8.4.0-bookworm@sha256:c22af04bb576503bf16b3e34a1fd2fd82de0f765afd866d2e380145e0af30d78 command: ["redis-server", "--save", "", "--appendonly", "no", "--maxmemory-policy", "allkeys-lru"] healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 3s retries: 20 restart: unless-stopped server: build: { context: ., target: control } image: ${TYRS_HAND_CONTROL_IMAGE:-ghcr.io/slovx2/tyrs-hand-control:0.1.0} command: ["tyrs-hand-server"] env_file: [.env] environment: TYRS_HAND_DATABASE_URL: postgres://tyrs_hand:${POSTGRES_PASSWORD:-tyrs_hand}@postgres:5432/tyrs_hand?sslmode=disable TYRS_HAND_REDIS_URL: redis://redis:6379/0 TYRS_HAND_HTTP_ADDR: :8080 TYRS_HAND_SEPARATE_WEBHOOK: ${TYRS_HAND_SEPARATE_WEBHOOK:-false} TYRS_HAND_WEBHOOK_HTTP_ADDR: :8081 TYRS_HAND_ATTACHMENT_ROOT: /data/control/attachments ports: ["127.0.0.1:${TYRS_HAND_HOST_PORT:-8080}:8080"] depends_on: postgres: { condition: service_healthy } redis: { condition: service_healthy } volumes: - control-attachments:/data/control/attachments healthcheck: test: ["CMD", "tyrs-hand-admin", "check-control"] interval: 30s timeout: 10s retries: 3 restart: unless-stopped discord: image: ${TYRS_HAND_CONTROL_IMAGE:-ghcr.io/slovx2/tyrs-hand-control:0.1.0} command: ["tyrs-hand-discord"] env_file: [.env] environment: TYRS_HAND_DATABASE_URL: postgres://tyrs_hand:${POSTGRES_PASSWORD:-tyrs_hand}@postgres:5432/tyrs_hand?sslmode=disable TYRS_HAND_REDIS_URL: redis://redis:6379/0 TYRS_HAND_ATTACHMENT_ROOT: /data/control/attachments volumes: - control-attachments:/data/control/attachments depends_on: server: { condition: service_healthy } healthcheck: test: ["CMD", "tyrs-hand-admin", "check-control"] interval: 30s timeout: 10s retries: 3 restart: unless-stopped admin: image: ${TYRS_HAND_CONTROL_IMAGE:-ghcr.io/slovx2/tyrs-hand-control:0.1.0} entrypoint: ["/usr/bin/tini", "--", "tyrs-hand-admin"] command: ["check-control"] env_file: [.env] environment: TYRS_HAND_DATABASE_URL: postgres://tyrs_hand:${POSTGRES_PASSWORD:-tyrs_hand}@postgres:5432/tyrs_hand?sslmode=disable TYRS_HAND_REDIS_URL: redis://redis:6379/0 profiles: [tools] depends_on: postgres: { condition: service_healthy } secrets: postgres_password: file: ./.local/secrets/postgres_password volumes: postgres-data: control-attachments: