add openresty and ssdb
This commit is contained in:
22
ssdb/Dockerfile
Normal file
22
ssdb/Dockerfile
Normal file
@ -0,0 +1,22 @@
|
||||
FROM alpine
|
||||
LABEL maintainer="Leonard Buskin <leonardbuskin@gmail.com>"
|
||||
|
||||
ARG VERSION=${VERSION:-master}
|
||||
|
||||
RUN apk add --no-cache --virtual .build-deps \
|
||||
curl gcc g++ make autoconf libc-dev libevent-dev linux-headers perl tar \
|
||||
&& mkdir -p /ssdb/tmp \
|
||||
&& curl -Lk "https://github.com/ideawu/ssdb/archive/${VERSION}.tar.gz" | \
|
||||
tar -xz -C /ssdb/tmp --strip-components=1 \
|
||||
&& cd /ssdb/tmp \
|
||||
&& make -j$(getconf _NPROCESSORS_ONLN) \
|
||||
&& make install PREFIX=/ssdb \
|
||||
&& rm -rf /ssdb/tmp \
|
||||
&& apk add --virtual .rundeps libstdc++ \
|
||||
&& apk add --no-cache bash python2 \
|
||||
&& apk del .build-deps
|
||||
|
||||
EXPOSE 8888
|
||||
VOLUME /ssdb/var
|
||||
COPY ssdb.conf /ssdb/ssdb.conf
|
||||
CMD ["/ssdb/ssdb-server", "/ssdb/ssdb.conf"]
|
52
ssdb/ssdb.conf
Normal file
52
ssdb/ssdb.conf
Normal file
@ -0,0 +1,52 @@
|
||||
# ssdb-server config
|
||||
# MUST indent by TAB!
|
||||
|
||||
# relative to path of this file, directory must exists
|
||||
work_dir = /data
|
||||
pidfile = /run/ssdb.pid
|
||||
|
||||
server:
|
||||
#ip: 127.0.0.1
|
||||
port: 8888
|
||||
# bind to public ip
|
||||
ip: 0.0.0.0
|
||||
# format: allow|deny: all|ip_prefix
|
||||
# multiple allows or denys is supported
|
||||
deny: all
|
||||
allow: 127.0.0.1
|
||||
allow: 192.
|
||||
allow: 172.
|
||||
# auth password must be at least 32 characters
|
||||
#auth: very-strong-password
|
||||
|
||||
replication:
|
||||
binlog: yes
|
||||
# Limit sync speed to *MB/s, -1: no limit
|
||||
sync_speed: -1
|
||||
slaveof:
|
||||
# to identify a master even if it moved(ip, port changed)
|
||||
# if set to empty or not defined, ip:port will be used.
|
||||
#id: svc_2
|
||||
# sync|mirror, default is sync
|
||||
#type: sync
|
||||
#host: s1.ssdb.db
|
||||
#port: 8888
|
||||
|
||||
logger:
|
||||
level: warn
|
||||
output: /var/log/ssdb.log
|
||||
rotate:
|
||||
size: 1000000000
|
||||
|
||||
leveldb:
|
||||
# in MB
|
||||
cache_size: 500
|
||||
# in KB
|
||||
block_size: 32
|
||||
# in MB
|
||||
write_buffer_size: 64
|
||||
# in MB
|
||||
compaction_speed: 1000
|
||||
# yes|no
|
||||
compression: yes
|
||||
|
Reference in New Issue
Block a user