Sign inSign up

codingjoe/the-box-redis:latest

Manifest digest

sha256:49b2854a84cad539343e856e77a7ce8a97ba00c8226a871f42332f724b77b0a7

Last pushed

7 months by codingjoe

Type

Compose

Manifest digest

sha256:49b2854a84cad539343e856e77a7ce8a97ba00c8226a871f42332f724b77b0a7

Compose file content

configs:
  redis.conf:
    content: |
      requirepass ${REDIS_PASSWORD}
    name: containers_redis.conf
name: containers
networks:
  app:
    internal: true
    name: containers_app
  app-wan:
    name: containers_app-wan
  caddy:
    external: true
    name: caddy
services:
  redis:
    command:
      - redis-server
      - --include
      - /usr/local/etc/redis/redis.conf
    configs:
      - source: redis.conf
        target: /usr/local/etc/redis/redis.conf
    healthcheck:
      interval: 10s
      retries: 5
      start_period: 30s
      test:
        - CMD
        - redis-cli
        - --pass
        - ${REDIS_PASSWORD}
        - ping
      timeout: 10s
    image: redis:8.6.0-alpine
    networks:
      app: null
    restart: unless-stopped
    volumes:
      - source: redis
        target: /data
        type: volume
        volume: {}
  web:
    depends_on:
      redis:
        condition: service_started
        required: true
    deploy:
      mode: replicated
      replicas: 2
      resources:
        limits:
          cpus: "2"
          memory: 512M
      restart_policy:
        condition: on-failure
        delay: 5s
        max_attempts: 3
        window: 120s
      update_config:
        delay: 1m
        failure_action: rollback
        monitor: 1m
        order: start-first
        parallelism: 1
    environment:
      - HOSTNAME=${HOSTNAME:-localhost}
      - PORT=${PORT:-8000}
      - REDIS_URL=redis://:${REDIS_PASSWORD}@redis/
    image: traefik/whoami:latest
    labels:
      - caddy=${HOSTNAME:-localhost}
      - caddy.reverse_proxy={{upstreams ${PORT:-8000}}}
      - caddy.reverse_proxy.lb_policy=round_robin
      - caddy.reverse_proxy.health_uri=/
      - caddy.reverse_proxy.health_headers.X-Forwarded-Host=${HOSTNAME:-localhost}
      - caddy.reverse_proxy.health_headers.X-Forwarded-Proto=https
      - caddy.cache
    networks:
      app: null
      app-wan: null
      caddy: null
    stop_grace_period: 1m
volumes:
  redis:
    name: containers_redis

Docker commands

docker compose -f oci://codingjoe/the-box-redis:latest up

Use the above command to pull and run the Compose file. Learn more.

Images used

Image + 1 more

Redis is the world’s fastest data platform for caching, vector search, and NoSQL databases.


Pulls

1B+

Stars

13616

Last Updated

about 10 hours

Image

Tiny Go webserver that prints OS information and HTTP request to output


Pulls

10M+

Stars

72

Last Updated

about 2 months