diff --git a/README.md b/README.md index 1fce05a..0bde644 100644 --- a/README.md +++ b/README.md @@ -143,6 +143,7 @@ A collection of delicious docker recipes. - [x] tmail :beetle: - [x] twemproxy - [x] vsftpd +- [x] webdis - [x] webhook - [x] webkit :beetle: @@ -399,7 +400,6 @@ A collection of delicious docker recipes. - [x] traefik - [x] mpromonet/v4l2rtspserver :camera: - [x] centurylink/watchtower -- [x] anapsix/webdis - [x] wekanteam/wekan - [x] requarks/wiki - [x] yourls diff --git a/webdis/Dockerfile b/webdis/Dockerfile new file mode 100644 index 0000000..6da655e --- /dev/null +++ b/webdis/Dockerfile @@ -0,0 +1,17 @@ +# +# Dockerfile for webdis +# + +FROM alpine:3 AS stage +ENV WEBDIS_VERSION=0.1.15 +RUN apk add --no-cache wget make gcc libevent-dev msgpack-c-dev musl-dev bsd-compat-headers +RUN wget https://github.com/nicolasff/webdis/archive/$WEBDIS_VERSION.tar.gz -O webdis.tar.gz +RUN tar -xvzf webdis.tar.gz && cd webdis-$WEBDIS_VERSION && make && make install +RUN which webdis + +FROM alpine:3 +MAINTAINER EasyPi Software Foundation +RUN apk add --no-cache libcrypto1.1 libevent msgpack-c +COPY --from=stage /usr/local/bin/webdis /usr/local/bin/ +EXPOSE 7379 +CMD ["webdis", "/etc/webdis/webdis.json"] diff --git a/webdis/README.md b/webdis/README.md index 76e89d0..6b1f69a 100644 --- a/webdis/README.md +++ b/webdis/README.md @@ -7,21 +7,4 @@ the reply back using a format of your choice. Accessing returns the response; the reply format can be changed with the optional extension (.json, .txt…) -## docker-compose.yml - -```yaml -webdis: - image: anapsix/webdis - ports: - - "7379:7379" - environment: - - REDIS_HOST=x.x.x.x - - REDIS_PORT=6379 - - REDIS_AUTH=null - - DATABASE=0 - - HTTP_HOST=0.0.0.0 - - HTTP_PORT=7379 - restart: unless-stopped -``` - [1]: https://webd.is/ diff --git a/webdis/data/webdis.json b/webdis/data/webdis.json new file mode 100644 index 0000000..dafa423 --- /dev/null +++ b/webdis/data/webdis.json @@ -0,0 +1,29 @@ +{ + "redis_host": "redis", + "redis_port": 6379, + "redis_auth": null, + "http_host": "0.0.0.0", + "http_port": 7379, + "threads": 5, + "pool_size": 10, + "daemonize": false, + "websockets": false, + "database": 0, + "acl": [ + { + "disabled": [ + "DEBUG", + "FLUSHDB", + "FLUSHALL" + ] + }, + { + "http_basic_auth": "username:password", + "enabled": [ + "DEBUG" + ] + } + ], + "verbosity": 99, + "logfile": "/dev/stdout" +} diff --git a/webdis/docker-compose.yml b/webdis/docker-compose.yml index ef9bacb..e0adc4d 100644 --- a/webdis/docker-compose.yml +++ b/webdis/docker-compose.yml @@ -1,12 +1,22 @@ -webdis: - image: anapsix/webdis - ports: - - "7379:7379" - environment: - - REDIS_HOST=x.x.x.x - - REDIS_PORT=6379 - - REDIS_AUTH=null - - DATABASE=0 - - HTTP_HOST=0.0.0.0 - - HTTP_PORT=7379 - restart: unless-stopped +version: "3.8" + +services: + + webdis: + image: vimagick/webdis + ports: + - "7379:7379" + volumes: + - ./data/webdis:/etc/webdis + depends_on: + - redis + restart: unless-stopped + + redis: + image: redis:alpine + command: --save 900 1 + ports: + - "127.0.0.1:6379:6379" + volumes: + - ./data/redis:/data + restart: unless-stopped