docker pull redis:6.2.6

  • docker-compose.yml
version: '3.8'
services:
  redis:
    image: redis:6.2.6
    restart: always
    #network_mode: host
    container_name: redis_1022
    volumes:
      #- ./vhosts:/etc/apache2/sites-enabled
      #- ./extra:/usr/local/apache2/conf/extra
      #- ./apache2.conf:/etc/apache2/apache2.conf     
      #- ./logs:/usr/local/apache2/logs
      #- ./html:/usr/local/apache2/htdocs
      - ./redis.conf:/usr/local/etc/redis/redis.conf:rw
      - ./data:/data
    ports:
      - "6379:6379"
    command:
      /bin/bash -c "redis-server /usr/local/etc/redis/redis.conf"
    #privileged:true
    #environment:
     # - NGINX_HOST=ap.local.lren.org
    #  - NGINX_PORT=80
  • redis.conf
    port 6379
    maxclients 10000
    requirepass 880866
    maxmemory 1048576000