zoukankan      html  css  js  c++  java
  • redixdb 基于redis 协议的实时key-value 存储

    redixdb 是一个基于redis 协议搞的一个实时key value 处理的轻量级应用,支持多种后端
    存储模型。
    以下是一个小版的容器镜像(官方的太大了)

    dockerfile

     
    FROM golang:alpine as build
    RUN apk update && apk add git
    WORKDIR /root/
    RUN git clone https://github.com/alash3al/redix.git
    RUN cd redix && go build
    FROM alpine:latest
    ENV APPVERSION=1.10
    LABEL VERSION="redix-${APPVERSION}"
    LABEL EMAIL="1141519465@qq.com"
    LABEL AUTHOR="dalongrong"
    WORKDIR /app
    ENV ENGINE=leveldb
    ENV STORAGE=./redix-data
    ENV RESP=:6380
    ENV REST=:7090
    ENV WORKERS=4
    EXPOSE 6380 7090
    ENV PATH=$PATH:/usr/local/bin
    COPY entrypoint.sh /app/entrypoint.sh
    RUN chmod +x /app/entrypoint.sh
    COPY --from=build /root/redix/redix /usr/local/bin/redix
    ENTRYPOINT ["./entrypoint.sh"]

    entrypoint.sh

    #!/bin/sh
    redix -engine ${ENGINE} -http-addr ${REST} -storage ${STORAGE} -workers ${WORKERS} -resp-addr ${RESP}

    使用

    使用已经构建好的

    docker run  -d -p 6380:6380 -p 7090:7090 dalongrong/redix:1.10

    说明

    redix 的作者搞了好多基于redis 协议的小程序比如sqler

    参考资料

    https://alash3al.github.io/redix/
    https://github.com/rongfengliang/redix-docker-image
    https://github.com/alash3al/redix

  • 相关阅读:
    Go map 切片
    Go map 增删改查和遍历
    Go map 基本使用
    Go 二维数组
    Go 切片
    Go 数组
    Go 错误处理 defer recover panic
    Go time模块
    5分钟入门MP4文件格式
    写盘工具
  • 原文地址:https://www.cnblogs.com/rongfengliang/p/11996004.html
Copyright © 2011-2022 走看看