Skip to content
This repository was archived by the owner on Jul 2, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.env
.env.example
.git
.gitignore
dist
Expand Down
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
REDIS_MAXMEMORY=64mb
REDIS_MAXMEMORY_POLICY=allkeys-lru
REDIS_MAXMEMORY_SAMPLES=5
REDIS_OPTIONS=
REDIS_TCP_BACKLOG=1024
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.env
dist
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ CentOS-6 6.10 x86_64 - Redis 3.2.
- Adds placeholder replacement of `RELEASE_VERSION` docker argument to systemd service unit template.
- Adds consideration for event lag into test cases for unhealthy health_status events.
- Adds port incrementation to Makefile's run template for container names with an instance suffix.
- Adds docker-compose configuration example.
- Removes use of `/etc/services-config` paths.
- Removes X-Fleet section from etcd register template unit-file.
- Removes the unused group element from the default container name.
Expand Down
44 changes: 44 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# ------------------------------------------------------------------------------
# Ref: https://docs.docker.com/compose/compose-file/
#
# Setup:
# docker-compose build
# docker-compose down
#
# Run Default example:
# docker-compose up -d
#
# Redis usage:
# docker-compose exec redis redis-cli --help
# docker-compose exec redis redis-cli --stat
# docker-compose exec redis redis-cli --lru-test 512
# docker-compose exec redis redis-cli monitor
# ------------------------------------------------------------------------------
version: "3.0"
services:
redis:
build:
context: "."
dockerfile: "Dockerfile"
environment:
REDIS_AUTOSTART_REDIS_BOOTSTRAP: "true"
REDIS_AUTOSTART_REDIS_WRAPPER: "true"
REDIS_MAXMEMORY: "${REDIS_MAXMEMORY}"
REDIS_MAXMEMORY_POLICY: "${REDIS_MAXMEMORY_POLICY}"
REDIS_MAXMEMORY_SAMPLES: "${REDIS_MAXMEMORY_SAMPLES}"
REDIS_OPTIONS: "${REDIS_OPTIONS}"
REDIS_TCP_BACKLOG: "${REDIS_TCP_BACKLOG}"
image: "jdeathe/centos-ssh-redis:latest"
ports:
- "6379:6379"
restart: "always"
sysctls:
net.core.somaxconn: "1024"
net.ipv4.ip_local_port_range: "1024 65535"
net.ipv4.route.flush: "1"
ulimits:
memlock: 82000
nofile:
soft: 524288
hard: 1048576
nproc: 65535