Created
March 15, 2026 00:00
-
-
Save edsonmgoz/f0723d7d21757b8a92ef058ca79a2f92 to your computer and use it in GitHub Desktop.
Containers to docker stats demo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services: | |
| nginx: | |
| image: nginx:stable-alpine | |
| ports: | |
| - "8080:80" | |
| restart: unless-stopped | |
| networks: | |
| - front | |
| httpd: | |
| image: httpd:2.4 | |
| ports: | |
| - "8082:80" | |
| restart: unless-stopped | |
| networks: | |
| - front | |
| registry: | |
| image: registry:3 | |
| ports: | |
| - "5000:5000" | |
| volumes: | |
| - registry_data:/var/lib/registry | |
| restart: unless-stopped | |
| networks: | |
| - front | |
| redis: | |
| image: redis:7-alpine | |
| command: ["redis-server", "--appendonly", "yes"] | |
| ports: | |
| - "6379:6379" | |
| volumes: | |
| - redis_data:/data | |
| healthcheck: | |
| test: ["CMD", "redis-cli", "ping"] | |
| interval: 5s | |
| timeout: 3s | |
| retries: 10 | |
| restart: unless-stopped | |
| networks: | |
| - back | |
| memcached: | |
| image: memcached:1.6.40-alpine | |
| command: ["memcached", "-m", "128"] | |
| ports: | |
| - "11211:11211" | |
| restart: unless-stopped | |
| networks: | |
| - back | |
| postgres: | |
| image: postgres:16-alpine | |
| environment: | |
| POSTGRES_USER: demo | |
| POSTGRES_PASSWORD: demo | |
| POSTGRES_DB: demo | |
| ports: | |
| - "5432:5432" | |
| volumes: | |
| - postgres_data:/var/lib/postgresql/data | |
| healthcheck: | |
| test: ["CMD-SHELL", "pg_isready -U demo -d demo"] | |
| interval: 5s | |
| timeout: 3s | |
| retries: 20 | |
| restart: unless-stopped | |
| networks: | |
| - back | |
| mongo: | |
| image: mongo:8 | |
| ports: | |
| - "27017:27017" | |
| volumes: | |
| - mongo_data:/data/db | |
| restart: unless-stopped | |
| networks: | |
| - back | |
| rabbitmq: | |
| image: rabbitmq:4-management-alpine | |
| hostname: rabbitmq | |
| environment: | |
| RABBITMQ_DEFAULT_USER: demo | |
| RABBITMQ_DEFAULT_PASS: demo | |
| ports: | |
| - "5672:5672" | |
| - "15672:15672" | |
| volumes: | |
| - rabbitmq_data:/var/lib/rabbitmq | |
| restart: unless-stopped | |
| networks: | |
| - back | |
| adminer: | |
| image: adminer:standalone | |
| ports: | |
| - "8081:8080" | |
| depends_on: | |
| postgres: | |
| condition: service_healthy | |
| restart: unless-stopped | |
| networks: | |
| - back | |
| cpu-burner-1: | |
| image: busybox:1.36-musl | |
| command: ["/bin/sh", "-c", "while :; do :; done"] | |
| restart: unless-stopped | |
| networks: | |
| - ops | |
| cpu-burner-2: | |
| image: busybox:1.36-musl | |
| command: ["/bin/sh", "-c", "while :; do :; done"] | |
| restart: unless-stopped | |
| networks: | |
| - ops | |
| io-writer-1: | |
| image: busybox:1.36-musl | |
| command: | |
| [ | |
| "/bin/sh", | |
| "-c", | |
| "mkdir -p /data && while :; do dd if=/dev/zero of=/data/blob1.bin bs=1M count=16 conv=fsync 2>/dev/null; rm -f /data/blob1.bin; sleep 1; done" | |
| ] | |
| volumes: | |
| - io_data_1:/data | |
| restart: unless-stopped | |
| networks: | |
| - ops | |
| io-writer-2: | |
| image: busybox:1.36-musl | |
| command: | |
| [ | |
| "/bin/sh", | |
| "-c", | |
| "mkdir -p /data && while :; do dd if=/dev/zero of=/data/blob2.bin bs=1M count=32 conv=fsync 2>/dev/null; rm -f /data/blob2.bin; sleep 2; done" | |
| ] | |
| volumes: | |
| - io_data_2:/data | |
| restart: unless-stopped | |
| networks: | |
| - ops | |
| net-pinger: | |
| image: busybox:1.36-musl | |
| command: | |
| [ | |
| "/bin/sh", | |
| "-c", | |
| "while :; do wget -q -O- http://nginx >/dev/null; wget -q -O- http://httpd >/dev/null; wget -q -O- http://registry:5000/v2/ >/dev/null; sleep 1; done" | |
| ] | |
| depends_on: | |
| - nginx | |
| - httpd | |
| - registry | |
| restart: unless-stopped | |
| networks: | |
| - front | |
| - ops | |
| idle-1: | |
| image: busybox:1.36-musl | |
| command: ["/bin/sh", "-c", "tail -f /dev/null"] | |
| restart: unless-stopped | |
| networks: | |
| - ops | |
| idle-2: | |
| image: busybox:1.36-musl | |
| command: ["/bin/sh", "-c", "tail -f /dev/null"] | |
| restart: unless-stopped | |
| networks: | |
| - ops | |
| volumes: | |
| registry_data: | |
| redis_data: | |
| postgres_data: | |
| mongo_data: | |
| rabbitmq_data: | |
| io_data_1: | |
| io_data_2: | |
| networks: | |
| front: | |
| back: | |
| ops: | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment