From the repository root, run:
docker compose up --buildThis command will:
-
Build the shared image from the
Dockerfile. -
Start:
- four
file_service_*containers, - one
coordinatorcontainer, - one
workercontainer - scalable to more.
- four
You can view logs with:
docker compose logs -fYou can simulate multiple workers by scaling the worker service:
docker compose up --build --scale worker=5This will start five independent worker containers (named worker_1, worker_2, etc.),
each connecting to the same coordinator and file service.
The containers communicate via a shared Docker network.
Each component reads its configuration from environment variables (set in docker-compose.yml):
| Variable | Default | Description |
|---|---|---|
FILE_SERVICE_HOST |
file_service |
Hostname of the main file service container |
FILE_SERVICE_PORT |
50051 |
It's default port |
COORDINATOR_HOST |
coordinator |
Hostname of the coordinator container |
COORDINATOR_PORT |
50052 |
Coordinator gRPC port |
In local (non-Docker) runs, these default to localhost and can be overridden with --env.
services/file_service/server.py: gRPC file server implementation.services/coordinator/coordinator.py: Coordinator gRPC service.services/coordinator/worker.py: Worker logic connecting to coordinator and file service.proto/generated/: Generated protobuf and gRPC Python files.
All processes are started using Python’s module syntax (e.g. python3 -m services.coordinator.coordinator).
If you’re actively editing the source code, you can mount your local directory into the containers by adding this under each service in docker-compose.yml:
volumes:
- .:/appThen code changes will be reflected without rebuilding the image.