3
0
Agent-Template/docker-compose.yml
2024-10-04 22:29:47 +02:00

40 lines
1.8 KiB
YAML

services:
management:
# select the correct one base on platform this is running on
image: git.chai.uni-hamburg.de/ums-agenten/management:arm64
#image: git.chai.uni-hamburg.de/ums-agenten/management:amd64
ports:
# external (to host) http port
- 8080:80
environment:
# *register* the agents to the management
- AGENTS_PROCESS=http://agent_process_1:3001,http://agent_process_2:3001
- AGENTS_SOLVE=http://agent_solve_1:3001
- AGENTS_GATEKEEPER=http://agent_gatekeeper_1:3001
volumes:
# all data is bind-mounted from ./data on the host into the containers
# the folder *share* is shared with all agents, it can be used to pass large data via files
- /data/share/:/ums-agent/share/
# the folder *persist* is different for each container and can be used to store data permanently
- /data/persist-management/:/ums-agenten/persist/
agent_process_1:
# this allow to do installs etc. in the docker image (a new image will be built on top of the provided one)
build:
context: .
dockerfile: Dockerfile
args:
# select the correct one base on platform this is running on
- IMAGE_FROM=git.chai.uni-hamburg.de/ums-agenten/base-agent:cpu-arm64
#- IMAGE_FROM=git.chai.uni-hamburg.de/ums-agenten/base-agent:cpu-amd64
#- IMAGE_FROM=git.chai.uni-hamburg.de/ums-agenten/base-agent:gpu-amd64
environment:
# tell the agent where the management is accessible
- MANAGEMENT=http://management
volumes:
- /data/share/:/ums-agent/share/
- /data/persist-process-1/:/ums-agenten/persist/
# this is for development (s.t. the changes in ./src/ are directly applied)
- ./src/:/ums-agenten/project/src/:ro
entrypoint: ... # TODO