Files
fleet/docker-compose.yml
T
Lucas Manuel Rodriguez c37f7463ad Remove unused cadvisor from dev/test docker-compose.yml (#49432)
Reasons to delete:
- We are not using this docker image.
- It's polluting the `docker compose up` logs with errors, e.g.:
```
cadvisor-1            | E0716 17:14:28.835089       1 manager.go:1116] Failed to create existing container: /docker/9ac0ef6fad63613bf90dbfb80e4fcf7affc4a378bbf1c2680f9fa0a587db783f: failed to identify the read-write layer ID for container "9ac0ef6fad63613bf90dbfb80e4fcf7affc4a378bbf1c2680f9fa0a587db783f". - open /var/lib/docker/image/overlayfs/layerdb/mounts/9ac0ef6fad63613bf90dbfb80e4fcf7affc4a378bbf1c2680f9fa0a587db783f/mount-id: no such file or directory
cadvisor-1            | E0716 17:14:28.839077       1 manager.go:1116] Failed to create existing container: /docker/891666c60086c1a695860bf5ea4a1eaf4ada94d902ee7392ddfab1bfd7ed5876: failed to identify the read-write layer ID for container "891666c60086c1a695860bf5ea4a1eaf4ada94d902ee7392ddfab1bfd7ed5876". - open /var/lib/docker/image/overlayfs/layerdb/mounts/891666c60086c1a695860bf5ea4a1eaf4ada94d902ee7392ddfab1bfd7ed5876/mount-id: no such file or directory
cadvisor-1            | E0716 17:14:28.841743       1 manager.go:1116] Failed to create existing container: /docker/bbfd8df39c02cec5d4ad665f4bb23faa5fc374efd7cb1ae0ff4864474c8a1b63: failed to identify the read-write layer ID for container "bbfd8df39c02cec5d4ad665f4bb23faa5fc374efd7cb1ae0ff4864474c8a1b63". - open /var/lib/docker/image/overlayfs/layerdb/mounts/bbfd8df39c02cec5d4ad665f4bb23faa5fc374efd7cb1ae0ff4864474c8a1b63/mount-id: no such file or directory
cadvisor-1            | E0716 17:14:28.844137       1 manager.go:1116] Failed to create existing container: /docker/62cad7aa07068e9ad14319a170622c4658008fd394347aa60e84f79727a03d29: failed to identify the read-write layer ID for container "62cad7aa07068e9ad14319a170622c4658008fd394347aa60e84f79727a03d29". - open /var/lib/docker/image/overlayfs/layerdb/mounts/62cad7aa07068e9ad14319a170622c4658008fd394347aa60e84f79727a03d29/mount-id: no such file or directory
cadvisor-1            | E0716 17:14:28.846207       1 manager.go:1116] Failed to create existing container: /docker/6fc30f822f6ccf81a192b5d385b30f5ed02f162df1c9823774405e0517be3cfe: failed to identify the read-write layer ID for container "6fc30f822f6ccf81a192b5d385b30f5ed02f162df1c9823774405e0517be3cfe". - open /var/lib/docker/image/overlayfs/layerdb/mounts/6fc30f822f6ccf81a192b5d385b30f5ed02f162df1c9823774405e0517be3cfe/mount-id: no such file or directory
cadvisor-1            | E0716 17:14:28.849253       1 manager.go:1116] Failed to create existing container: /docker/a7cec691d2ba6dc8cb8b034729957e6d9bc6dca06813953288d4430cf8d82d28: failed to identify the read-write layer ID for container "a7cec691d2ba6dc8cb8b034729957e6d9bc6dca06813953288d4430cf8d82d28". - open /var/lib/docker/image/overlayfs/layerdb/mounts/a7cec691d2ba6dc8cb8b034729957e6d9bc6dca06813953288d4430cf8d82d28/mount-id: no such file or directory
cadvisor-1            | E0716 17:14:28.851095       1 manager.go:1116] Failed to create existing container: /docker/160d97ff57081d3439843b5e2fd6bea00ef3ee744de51d01be1f6c0c90dec97d: failed to identify the read-write layer ID for container "160d97ff57081d3439843b5e2fd6bea00ef3ee744de51d01be1f6c0c90dec97d". - open /var/lib/docker/image/overlayfs/layerdb/mounts/160d97ff57081d3439843b5e2fd6bea00ef3ee744de51d01be1f6c0c90dec97d/mount-id: no such file or directory
cadvisor-1            | E0716 17:14:28.853019       1 manager.go:1116] Failed to create existing container: /docker/9f5f2f98be4da013911de372e808e33ae93b8f5cb2219adb681f31ee3c1497ed: failed to identify the read-write layer ID for container "9f5f2f98be4da013911de372e808e33ae93b8f5cb2219adb681f31ee3c1497ed". - open /var/lib/docker/image/overlayfs/layerdb/mounts/9f5f2f98be4da013911de372e808e33ae93b8f5cb2219adb681f31ee3c1497ed/mount-id: no such file or directory
cadvisor-1            | E0716 17:14:28.854765       1 manager.go:1116] Failed to create existing container: /docker/c637f0bf6708caeec3fe3b9b610204e84b8b4529cf770c09d6ca2e82f5b681e3: failed to identify the read-write layer ID for container "c637f0bf6708caeec3fe3b9b610204e84b8b4529cf770c09d6ca2e82f5b681e3". - open /var/lib/docker/image/overlayfs/layerdb/mounts/c637f0bf6708caeec3fe3b9b610204e84b8b4529cf770c09d6ca2e82f5b681e3/mount-id: no such file or directory
cadvisor-1            | E0716 17:14:28.856713       1 manager.go:1116] Failed to create existing container: /docker/74953fdfba3c534515113bedef7f17ce01a7feef27ec22000d52ff4f98a538e9: failed to identify the read-write layer ID for container "74953fdfba3c534515113bedef7f17ce01a7feef27ec22000d52ff4f98a538e9". - open /var/lib/docker/image/overlayfs/layerdb/mounts/74953fdfba3c534515113bedef7f17ce01a7feef27ec22000d52ff4f98a538e9/mount-id: no such file or directory
cadvisor-1            | E0716 17:14:28.858256       1 manager.go:1116] Failed to create existing container: /docker/96e468826a675094cf686619e9560a5ed0e089bbca8f3c9c41a5d432d7e7e235: failed to identify the read-write layer ID for container "96e468826a675094cf686619e9560a5ed0e089bbca8f3c9c41a5d432d7e7e235". - open /var/lib/docker/image/overlayfs/layerdb/mounts/96e468826a675094cf686619e9560a5ed0e089bbca8f3c9c41a5d432d7e7e235/mount-id: no such file or directory
cadvisor-1            | E0716 17:14:28.859877       1 manager.go:1116] Failed to create existing container: /docker/785d4800c3249c155f6b921ef554f49851920e5d6a295e1d2ef12fb85a327935: failed to identify the read-write layer ID for container "785d4800c3249c155f6b921ef554f49851920e5d6a295e1d2ef12fb85a327935". - open /var/lib/docker/image/overlayfs/layerdb/mounts/785d4800c3249c155f6b921ef554f49851920e5d6a295e1d2ef12fb85a327935/mount-id: no such file or directory
```

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
* Removed the cAdvisor monitoring service from the Docker Compose
configuration.
* The application no longer starts cAdvisor or exposes its monitoring
endpoint by default.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-16 17:06:00 -03:00

169 lines
5.9 KiB
YAML

---
services:
# To test with MariaDB, set FLEET_MYSQL_IMAGE to mariadb:10.6 or the like (note MariaDB is not
# officially supported).
# To run in macOS M1, set FLEET_MYSQL_PLATFORM=linux/arm64/v8
mysql:
image: ${FLEET_MYSQL_IMAGE:-mysql:8.0.44}
platform: ${FLEET_MYSQL_PLATFORM:-linux/x86_64}
volumes:
- mysql-persistent-volume:/tmp
command: [
"mysqld",
"--datadir=/tmp/mysqldata",
# These 3 keys run MySQL with GTID consistency enforced to avoid issues with production deployments that use it.
"--enforce-gtid-consistency=ON",
"--log-bin=bin.log",
"--server-id=master-01",
# Required for storage of Apple MDM bootstrap packages.
"--max_allowed_packet=536870912",
# Automatically expire binary logs after 1 day to save disk space in dev. Default is 30 days.
"--binlog-expire-logs-seconds=86400",
]
environment: &mysql-default-environment
MYSQL_ROOT_PASSWORD: toor
MYSQL_DATABASE: fleet
MYSQL_USER: fleet
MYSQL_PASSWORD: insecure
# This is required by Percona XtraDB server.
CLUSTER_NAME: fleet
ports:
- "127.0.0.1:${FLEET_MYSQL_PORT:-3306}:3306"
mysql_test:
image: ${FLEET_MYSQL_IMAGE:-mysql:8.0.44}
platform: ${FLEET_MYSQL_PLATFORM:-linux/x86_64}
# innodb-file-per-table=OFF gives ~20% speedup for test runs.
command: [
"mysqld",
"--datadir=/tmpfs",
"--slow_query_log=1",
"--log_output=TABLE",
"--log-queries-not-using-indexes",
"--innodb-file-per-table=OFF",
"--table-definition-cache=8192",
# These 3 keys run MySQL with GTID consistency enforced to avoid issues with production deployments that use it.
"--enforce-gtid-consistency=ON",
"--log-bin=bin.log",
"--server-id=1",
# Required for storage of Apple MDM bootstrap packages.
"--max_allowed_packet=536870912",
# Automatically expire binary logs after 1 day to save disk space in dev. Default is 30 days.
"--binlog-expire-logs-seconds=86400",
]
environment: *mysql-default-environment
ports:
- "127.0.0.1:${FLEET_MYSQL_TEST_PORT:-3307}:3306"
tmpfs:
- /var/lib/mysql:rw,noexec,nosuid
- /tmpfs
mysql_replica_test:
image: ${FLEET_MYSQL_IMAGE:-mysql:8.0.44}
platform: ${FLEET_MYSQL_PLATFORM:-linux/x86_64}
# innodb-file-per-table=OFF gives ~20% speedup for test runs.
command: [
"mysqld",
"--datadir=/tmpfs",
"--slow_query_log=1",
"--log_output=TABLE",
"--log-queries-not-using-indexes",
"--innodb-file-per-table=OFF",
"--table-definition-cache=8192",
# These 3 keys run MySQL with GTID consistency enforced to avoid issues with production deployments that use it.
"--enforce-gtid-consistency=ON",
"--log-bin=bin.log",
"--server-id=2",
# Required for storage of Apple MDM bootstrap packages.
"--max_allowed_packet=536870912",
# Automatically expire binary logs after 1 day to save disk space in dev. Default is 30 days.
"--binlog-expire-logs-seconds=86400",
]
environment: *mysql-default-environment
ports:
# ports 3308 and 3309 are used by the main and replica MySQL containers in tools/mysql-replica-testing/docker-compose.yml
- "127.0.0.1:${FLEET_MYSQL_REPLICA_TEST_PORT:-3310}:3306"
tmpfs:
- /var/lib/mysql:rw,noexec,nosuid
- /tmpfs
# Unauthenticated SMTP server.
mailhog:
image: mailhog/mailhog:latest
ports:
- "127.0.0.1:${FLEET_MAILHOG_WEB_PORT:-8025}:8025"
- "127.0.0.1:${FLEET_MAILHOG_SMTP_PORT:-1025}:1025"
# SMTP server with Basic Authentication.
mailpit:
image: axllent/mailpit:latest
ports:
- "127.0.0.1:${FLEET_MAILPIT_WEB_PORT:-8026}:8025"
- "127.0.0.1:${FLEET_MAILPIT_SMTP_PORT:-1026}:1025"
volumes:
- ./tools/mailpit/auth.txt:/auth.txt
command: ["--smtp-auth-file=/auth.txt", "--smtp-auth-allow-insecure=true"]
# SMTP server with TLS
smtp4dev_test:
image: rnwood/smtp4dev:v3
ports:
- "127.0.0.1:${FLEET_SMTP4DEV_WEB_PORT:-8028}:80"
- "127.0.0.1:${FLEET_SMTP4DEV_SMTP_PORT:-1027}:25"
volumes:
- ./tools/smtp4dev:/certs
environment:
- ServerOptions__TlsMode=ImplicitTls
- ServerOptions__TlsCertificate=/certs/fleet.crt
- ServerOptions__TlsCertificatePrivateKey=/certs/fleet.key
redis:
image: ${FLEET_REDIS_IMAGE:-redis:6.2}
ports:
- "127.0.0.1:${FLEET_REDIS_PORT:-6379}:6379"
saml_idp:
image: fleetdm/docker-idp:latest
volumes:
- ./tools/saml/users.php:/var/www/simplesamlphp/config/authsources.php
- ./tools/saml/config.php:/var/www/simplesamlphp/metadata/saml20-sp-remote.php
ports:
- "127.0.0.1:${FLEET_SAML_IDP_HTTP_PORT:-9080}:8080"
- "127.0.0.1:${FLEET_SAML_IDP_HTTPS_PORT:-9443}:8443"
prometheus:
image: prom/prometheus:latest
ports:
- "127.0.0.1:${FLEET_PROMETHEUS_PORT:-9090}:9090"
volumes:
- ./tools/app/prometheus.yml:/etc/prometheus/prometheus.yml
# localstack to simulate AWS integrations like firehose & kinesis
# use http://localhost:4566 as the `--endpoint-url` argument in awscli
localstack:
image: localstack/localstack:4.5
ports:
- "127.0.0.1:${FLEET_LOCALSTACK_PORT:-4566}:4566"
- "127.0.0.1:${FLEET_LOCALSTACK_LEGACY_PORT:-4571}:4571"
environment:
- SERVICES=firehose,kinesis,s3,iam,sts,secretsmanager
# s3 compatible object storage (file carving/software installers)
s3:
image: rustfs/rustfs:1.0.0-alpha.85
ports:
- "127.0.0.1:${FLEET_S3_PORT:-9000}:9000"
- "127.0.0.1:${FLEET_S3_CONSOLE_PORT:-9001}:9001"
environment:
- RUSTFS_ADDRESS=0.0.0.0:9000
- RUSTFS_CONSOLE_ADDRESS=0.0.0.0:9001
- RUSTFS_CONSOLE_ENABLE=true
- RUSTFS_ACCESS_KEY=locals3
- RUSTFS_SECRET_KEY=locals3
volumes:
- data-s3:/data:rw
volumes:
mysql-persistent-volume:
data-s3: