add webdis

This commit is contained in:
kev 2021-05-10 16:13:25 +08:00
parent c2719ee1aa
commit 97ea4e9e64
5 changed files with 69 additions and 30 deletions

View File

@ -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

17
webdis/Dockerfile Normal file
View File

@ -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"]

View File

@ -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/

29
webdis/data/webdis.json Normal file
View File

@ -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"
}

View File

@ -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