swarthy/redis-semaphore

View on GitHub
docker-compose.yml

Summary

Maintainability
Test Coverage
version: '3.7'

services:
  waiter:
    image: node:alpine
    volumes:
      - ./:/app
    working_dir: /app
    command: >
      sh -c "
        corepack enable &&
        yarn wait-for --redis redis://redis1 &&
        yarn wait-for --redis redis://redis2 &&
        yarn wait-for --redis redis://redis3 &&
        echo 'All redis instances ready!'
      "

  redis1:
    image: redis:alpine
    ports:
      - 6001:6379

  redis2:
    image: redis:alpine
    ports:
      - 6002:6379

  redis3:
    image: redis:alpine
    ports:
      - 6003:6379