1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Local celld + Azurite. No AWS or Cloudflare account.
#
# celld's Azure emulator client always talks to 127.0.0.1:10000. Docker
# Desktop / Dory inject extra_hosts (host.docker.internal), which cannot
# combine with network_mode: service:azurite. The celld image therefore
# forwards 127.0.0.1:10000 -> azurite:10000 via socat (see Dockerfile).
#
# Host ports:
# 18080 → Worker HTTP (override with CELLD_HTTP_PORT if busy)
# 10000 → Azurite (for `celld deploy` / `celld diagnose` on the host)
# Do not publish 8081 (peer/internal).
#
# Azurite is a development store — not a production celld fleet.
#
# docker compose -f tests/celld/docker-compose.yml up -d --build azurite
# export AZURE_STORAGE_USE_EMULATOR=true
# export AZURE_STORAGE_ACCOUNT_NAME=devstoreaccount1
# export AZURE_STORAGE_ACCOUNT_KEY='Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw=='
# celld deploy tests/celld/worker --bucket az://celld
# docker compose -f tests/celld/docker-compose.yml up -d celld
# CELLD_URL=http://127.0.0.1:${CELLD_HTTP_PORT:-18080} cargo test --test celld
services:
azurite:
image: mcr.microsoft.com/azure-storage/azurite
command:
- azurite-blob
- --blobHost
- 0.0.0.0
- --blobPort
- "10000"
- --skipApiVersionCheck
- --loose
ports:
- "127.0.0.1:10000:10000"
volumes:
- azurite-data:/data
azurite-init:
image: mcr.microsoft.com/azure-cli
depends_on:
- azurite
environment:
AZURE_STORAGE_CONNECTION_STRING: >-
DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://azurite:10000/devstoreaccount1;
volumes:
- ./init-container.sh:/init-container.sh:ro
entrypoint:
celld:
build:
context: .
dockerfile: Dockerfile
restart: always
init: true
ports:
- "127.0.0.1:${CELLD_HTTP_PORT:-18080}:8080"
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
azurite-init:
condition: service_completed_successfully
environment:
AZURE_STORAGE_USE_EMULATOR: "true"
AZURE_STORAGE_ACCOUNT_NAME: devstoreaccount1
AZURE_STORAGE_ACCOUNT_KEY: Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==
CELLD_BUCKET: az://celld
# SQLite/replication working directory on the node — not Worker source HMR.
CELLD_WATCH: /var/lib/celld/state
CELLD_ADVERTISE: 127.0.0.1:8081
volumes:
- celld-state:/var/lib/celld
- ./entrypoint.sh:/entrypoint.sh:ro
- ./worker:/worker:ro
entrypoint:
healthcheck:
test:
interval: 2s
timeout: 2s
retries: 30
start_period: 5s
volumes:
azurite-data:
celld-state: