services:
envoy-gateway:
image: envoyproxy/envoy:v1.28-latest
container_name: agentd-gateway
ports:
- "8080:8080" - "9901:9901" volumes:
- ../envoy/envoy.yaml:/etc/envoy/envoy.yaml:ro
command: ["-c", "/etc/envoy/envoy.yaml", "--log-level", "info"]
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
tag: "{{.Name}}"
depends_on:
- opa
- agentd
networks:
- agentd-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9901/ready"]
interval: 10s
timeout: 5s
retries: 3
envoy-egress:
image: envoyproxy/envoy:v1.28-latest
container_name: agentd-egress
ports:
- "8443:8443" - "9902:9902" volumes:
- ../envoy/envoy-egress.yaml:/etc/envoy/envoy.yaml:ro
command: ["-c", "/etc/envoy/envoy.yaml", "--log-level", "info"]
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
tag: "{{.Name}}"
depends_on:
- opa
networks:
- agentd-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9902/ready"]
interval: 10s
timeout: 5s
retries: 3
opa:
image: openpolicyagent/opa:latest-envoy
container_name: agentd-opa
ports:
- "8181:8181" volumes:
- ../opa/opa.yaml:/etc/opa/config.yaml:ro
- ../../build/bundles:/bundles:ro
command:
- "run"
- "--server"
- "--config-file=/etc/opa/config.yaml"
- "--addr=0.0.0.0:8181"
- "--diagnostic-addr=0.0.0.0:8282"
- "--bundle"
- "/bundles/agentd-bundle.tar.gz"
networks:
- agentd-network
healthcheck:
test: ["CMD", "/opa", "eval", "true"]
interval: 10s
timeout: 5s
retries: 3
agentd:
build:
context: ../..
dockerfile: Dockerfile
container_name: agentd
privileged: true
security_opt:
- apparmor:unconfined
- seccomp:unconfined
entrypoint: ["/bin/sh", "-c"]
command:
- |
DIGEST=$$(sha256sum /etc/agentd/bundles/agentd-bundle.tar.gz | cut -d' ' -f1)
exec /usr/local/bin/agentd run --demo --capability-digest "$$DIGEST"
volumes:
- agentd-work:/var/lib/agentd/work
- agentd-data:/var/lib/agentd/data
- ../../build/bundles:/etc/agentd/bundles:ro
- ../../build/capability:/var/lib/agentd/build/capability:ro
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
tag: "{{.Name}}"
environment:
- AGENTD_LOG_LEVEL=info
- SMITH_EXECUTOR_ALLOW_INSECURE_FALLBACK=1
- AGENTD_WORK_ROOT=/var/lib/agentd/work
- AGENTD_POLICY_BUNDLE=/etc/agentd/bundles/agentd-bundle.tar.gz
- AGENTD_GRPC_LISTEN=0.0.0.0:9500
- AGENTD_HTTP_LISTEN=0.0.0.0:8090
- AGENTD_OPA_URL=http://opa:8181
- AGENTD_EGRESS_PROXY=http://envoy-egress:8443
networks:
- agentd-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8090/health"]
interval: 10s
timeout: 5s
retries: 3
depends_on:
- envoy-egress
networks:
agentd-network:
driver: bridge
volumes:
agentd-work:
agentd-data: