This commit is contained in:
Sergey Yelin 2020-09-04 18:18:11 +03:00
parent c4576bb79d
commit 801432bde2
No known key found for this signature in database
GPG Key ID: 0B653F3417EAEC54
3 changed files with 61 additions and 0 deletions

1
.gitignore vendored
View File

@ -17,3 +17,4 @@ _build
*.iml
rebar3.crashdump
*~
docker-compose.yml

51
docker-compose.sh Executable file
View File

@ -0,0 +1,51 @@
#!/bin/bash
cat <<EOF
version: '2.1'
services:
${SERVICE_NAME}:
image: ${BUILD_IMAGE}
volumes:
- .:$PWD
- $HOME/.cache:/home/$UNAME/.cache
- $HOME/.ssh:/home/$UNAME/.ssh:ro
working_dir: $PWD
command: /sbin/init
depends_on:
riakdb:
condition: service_healthy
riakdb:
image: dr2.rbkmoney.com/rbkmoney/riak-base:38fbd6239f7d1f7cac45912a7031aea8db010b0c
environment:
- CLUSTER_NAME=riakkv
labels:
- "com.basho.riak.cluster.name=riakkv"
volumes:
- ./test/riak/user.conf:/etc/riak/user.conf:ro
healthcheck:
test: "riak-admin test"
interval: 5s
timeout: 5s
retries: 20
member:
image: dr2.rbkmoney.com/rbkmoney/riak-base:38fbd6239f7d1f7cac45912a7031aea8db010b0c
labels:
- "com.basho.riak.cluster.name=riakkv"
links:
- riakdb
depends_on:
- riakdb
environment:
- CLUSTER_NAME=riakkv
- COORDINATOR_NODE=riakdb
volumes:
- ./test/riak/user.conf:/etc/riak/user.conf:ro
volumes:
schemas:
external: false
EOF

9
test/riak/user.conf Normal file
View File

@ -0,0 +1,9 @@
## Specifies the storage engine used for Riak's key-value data
## and secondary indexes (if supported).
##
## Default: bitcask
##
## Acceptable values:
## - one of: bitcask, leveldb, memory, multi, prefix_multi
storage_backend = leveldb
riak_control = on