services: # Gotify instance with 64 shards gotify-64: build: context: . dockerfile: docker/Dockerfile args: GO_VERSION: 1.25.1 BUILD_JS: 1 RUN_TESTS: 0 container_name: gotify-bench-64 ports: - "8080:80" volumes: - ./benchmark/configs/config-64.yml:/app/config.yml:ro - gotify-64-data:/app/data environment: - GOTIFY_SERVER_STREAM_SHARDCOUNT=64 - GOTIFY_SERVER_STREAM_READBUFFERSIZE=8192 - GOTIFY_SERVER_STREAM_WRITEBUFFERSIZE=8192 - GOTIFY_SERVER_STREAM_CHANNELBUFFERSIZE=10 networks: - benchmark-net healthcheck: interval: 10s timeout: 5s retries: 3 start_period: 10s test: ["CMD", "curl", "-f", "http://localhost:80/health"] # Gotify instance with 128 shards gotify-128: build: context: . dockerfile: docker/Dockerfile args: GO_VERSION: 1.25.1 BUILD_JS: 1 RUN_TESTS: 0 container_name: gotify-bench-128 ports: - "8081:80" volumes: - ./benchmark/configs/config-128.yml:/app/config.yml:ro - gotify-128-data:/app/data environment: - GOTIFY_SERVER_STREAM_SHARDCOUNT=128 - GOTIFY_SERVER_STREAM_READBUFFERSIZE=8192 - GOTIFY_SERVER_STREAM_WRITEBUFFERSIZE=8192 - GOTIFY_SERVER_STREAM_CHANNELBUFFERSIZE=10 networks: - benchmark-net healthcheck: interval: 10s timeout: 5s retries: 3 start_period: 10s test: ["CMD", "curl", "-f", "http://localhost:80/health"] # Gotify instance with 256 shards (default) gotify-256: build: context: . dockerfile: docker/Dockerfile args: GO_VERSION: 1.25.1 BUILD_JS: 1 RUN_TESTS: 0 container_name: gotify-bench-256 ports: - "8082:80" volumes: - ./benchmark/configs/config-256.yml:/app/config.yml:ro - gotify-256-data:/app/data environment: - GOTIFY_SERVER_STREAM_SHARDCOUNT=256 - GOTIFY_SERVER_STREAM_READBUFFERSIZE=8192 - GOTIFY_SERVER_STREAM_WRITEBUFFERSIZE=8192 - GOTIFY_SERVER_STREAM_CHANNELBUFFERSIZE=10 networks: - benchmark-net healthcheck: interval: 10s timeout: 5s retries: 3 start_period: 10s test: ["CMD", "curl", "-f", "http://localhost:80/health"] # Gotify instance with 512 shards gotify-512: build: context: . dockerfile: docker/Dockerfile args: GO_VERSION: 1.25.1 BUILD_JS: 1 RUN_TESTS: 0 container_name: gotify-bench-512 ports: - "8083:80" volumes: - ./benchmark/configs/config-512.yml:/app/config.yml:ro - gotify-512-data:/app/data environment: - GOTIFY_SERVER_STREAM_SHARDCOUNT=512 - GOTIFY_SERVER_STREAM_READBUFFERSIZE=8192 - GOTIFY_SERVER_STREAM_WRITEBUFFERSIZE=8192 - GOTIFY_SERVER_STREAM_CHANNELBUFFERSIZE=10 networks: - benchmark-net healthcheck: interval: 10s timeout: 5s retries: 3 start_period: 10s test: ["CMD", "curl", "-f", "http://localhost:80/health"] # Gotify instance with 1024 shards gotify-1024: build: context: . dockerfile: docker/Dockerfile args: GO_VERSION: 1.25.1 BUILD_JS: 1 RUN_TESTS: 0 container_name: gotify-bench-1024 ports: - "8084:80" volumes: - ./benchmark/configs/config-1024.yml:/app/config.yml:ro - gotify-1024-data:/app/data environment: - GOTIFY_SERVER_STREAM_SHARDCOUNT=1024 - GOTIFY_SERVER_STREAM_READBUFFERSIZE=8192 - GOTIFY_SERVER_STREAM_WRITEBUFFERSIZE=8192 - GOTIFY_SERVER_STREAM_CHANNELBUFFERSIZE=10 networks: - benchmark-net healthcheck: interval: 10s timeout: 5s retries: 3 start_period: 10s test: ["CMD", "curl", "-f", "http://localhost:80/health"] # k6 load testing tool k6-loadtest: image: grafana/k6:latest container_name: k6-benchmark volumes: - ./benchmark/k6:/scripts networks: - benchmark-net depends_on: - gotify-64 - gotify-128 - gotify-256 - gotify-512 - gotify-1024 command: run /scripts/websocket-test.js profiles: - benchmark volumes: gotify-64-data: gotify-128-data: gotify-256-data: gotify-512-data: gotify-1024-data: networks: benchmark-net: driver: bridge