-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.node.yml
More file actions
55 lines (53 loc) · 1.75 KB
/
docker-compose.node.yml
File metadata and controls
55 lines (53 loc) · 1.75 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
46
47
48
49
50
51
52
53
54
55
services:
node:
build:
context: ./node
dockerfile: Dockerfile
image: chap-node:local
container_name: chap-node
restart: unless-stopped
environment:
- NODE_ID=${NODE_ID:?NODE_ID is required - get this from the Chap dashboard}
- NODE_TOKEN=${NODE_TOKEN:?NODE_TOKEN is required - get this from the Chap dashboard}
- CHAP_SERVER_URL=${CHAP_SERVER_URL:?CHAP_SERVER_URL is required - e.g. ws://your-server:8081}
# Compatibility: Docker API version override.
# If you see "client version X is too old. Minimum supported API version is 1.44",
# upgrade the client or bump this value.
# If you see "client version X is too new. Maximum supported API version is ...",
# lower this value (or upgrade the Docker daemon).
- DOCKER_API_VERSION=${DOCKER_API_VERSION:-1.44}
- CHAP_DATA_DIR=/data
- CHAP_MAX_CPUS=${CHAP_MAX_CPUS:-20}
- CHAP_MAX_MEMORY=${CHAP_MAX_MEMORY:-20g}
- CHAP_MAX_PIDS=${CHAP_MAX_PIDS:-10000}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- chap_data:/data
ports:
- "${BROWSER_WS_PORT:-6002}:6002"
networks:
- chap-node-network
# Security: Run as non-root user (requires docker group)
# user: "1000:999" # Uncomment and adjust UID:GID as needed
# Security: Resource limits for the agent itself
deploy:
resources:
limits:
cpus: '1'
memory: 512M
reservations:
cpus: '0.25'
memory: 128M
# Security: Health check
healthcheck:
test: ["CMD", "node", "-e", "process.exit(0)"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
volumes:
chap_data:
driver: local
networks:
chap-node-network:
driver: bridge