-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
45 lines (37 loc) · 1.27 KB
/
docker-compose.yml
File metadata and controls
45 lines (37 loc) · 1.27 KB
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
version: '3.8'
services:
azure-agent:
build:
context: .
args:
# aws-ssm installed by default (hypolas/aws-ssm-lite)
INSTALL_AWS_SSM: "true"
container_name: azure-devops-agent
hostname: azure-agent
environment:
# Azure DevOps configuration (required)
- AZP_URL=${AZP_URL}
- AZP_POOL=${AZP_POOL}
- AZP_AGENT_NAME=${AZP_AGENT_NAME:-azure-agent}
- AGENT_NUMBER=${AGENT_NUMBER:-1}
- INSTALL_FOLDER=${INSTALL_FOLDER}
# AWS for token retrieval (if AZP_TOKEN not provided)
- AWS_REGION=${AWS_REGION}
- AZURE_DEVOPS_TOKEN_SECRET_ARN=${AZURE_DEVOPS_TOKEN_SECRET_ARN}
# Direct token (optional, takes priority over AWS)
- AZP_TOKEN=${AZP_TOKEN}
# Container configuration
- DEFAULT_CONTAINER_IMAGE=ubuntu:22.04
- DEFAULT_VOLUMES=/var/run/docker.sock:/var/run/docker.sock,/cache:/cache,/data:/data
volumes:
# Docker socket for builds
- /var/run/docker.sock:/var/run/docker.sock
- ${INSTALL_FOLDER}:${INSTALL_FOLDER}
restart: unless-stopped
# Healthcheck to verify agent is running
healthcheck:
test: ["CMD-SHELL", "pgrep -f 'Agent.Listener' || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s