version: '3.7'

volumes:
  # We'll define a volume that will store the data from the mongo databases:
  mongodb-data: {}

services:
  cenit:
    environment:
      - ENABLE_RERECAPTCHA=false
      - DB_PORT=mongodb
      - RABBITMQ_BIGWIG_TX_URL=amqp://cenit_rabbit:cenit_rabbit@rabbitmq/cenit_rabbit_vhost
      - UNICORN_WORKERS=5
      - MAXIMUM_UNICORN_CONSUMERS=3
      - DB_PROD='cenit_prod'
    build: .
    ports:
      - "3000:3000"
    depends_on:
      - mongodb
      - rabbitmq
    command: ["foreman", "start", "-f", "Procfile"]

  rabbitmq:
    image: rabbitmq:management
    ports:
      - "15672:15672"
      - "5672:5672"
    environment:
      RABBITMQ_DEFAULT_PASS: cenit_rabbit
      RABBITMQ_DEFAULT_USER: cenit_rabbit
      RABBITMQ_DEFAULT_VHOST: cenit_rabbit_vhost
    labels:
        NAME: "rabbitmq-server"

  mongodb:
    image: mongo:3.2
    volumes:
      # We'll mount the 'mongodb-data' volume into the location mongodb stores it's data:
      - mongodb-data:/data/db

version: '3.7'

volumes:
  # We'll define a volume that will store the data from the mongo databases:
  mongodb-data: {}
  redis-data: {}

services:
  cenit:
    environment:
      - ENABLE_RERECAPTCHA=false
      - DB_PORT=mongodb
      - RABBITMQ_BIGWIG_TX_URL=amqp://cenit_rabbit:cenit_rabbit@rabbitmq/cenit_rabbit_vhost
      - UNICORN_WORKERS=5
      - MAXIMUM_UNICORN_CONSUMERS=3
      - DB_PROD='cenit_prod'
      - REDIS_HOST=redis
    build: .
    ports:
      - "3000:3000"
    depends_on:
      - mongodb
      - rabbitmq
      - redis
    command: ["foreman", "start", "-f", "Procfile"]

  rabbitmq:
    image: rabbitmq:management
    ports:
      - "15672:15672"
      - "5672:5672"
    environment:
      RABBITMQ_DEFAULT_PASS: cenit_rabbit
      RABBITMQ_DEFAULT_USER: cenit_rabbit
      RABBITMQ_DEFAULT_VHOST: cenit_rabbit_vhost
    labels:
        NAME: "rabbitmq-server"

  mongodb:
    image: mongo:3.2
    volumes:
      # We'll mount the 'mongodb-data' volume into the location mongodb stores it's data:
      - mongodb-data:/data/db

  redis:
    image: redis
    volumes:
      - redis-data:/data
    command: ["redis-server", "--appendonly", "yes"]

Add Redis configuration and environment variable
Add Redis configuration and environment variable
