From f889be6cdb75b2afaa1306c145d6ce7d2814cee0 Mon Sep 17 00:00:00 2001 From: siujamo Date: Thu, 30 Jul 2026 14:24:42 +0800 Subject: [PATCH] feat(valkey): add Valkey 9 Alpine compose file - Add docker-compose.yaml with password authentication commented out by default (no password required) - Add .env.example with VALKEY_PASSWORD documented and commented out --- compose/valkey/.env.example | 9 +++++++++ compose/valkey/docker-compose.yaml | 30 ++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 compose/valkey/.env.example create mode 100644 compose/valkey/docker-compose.yaml diff --git a/compose/valkey/.env.example b/compose/valkey/.env.example new file mode 100644 index 0000000..3c20dbc --- /dev/null +++ b/compose/valkey/.env.example @@ -0,0 +1,9 @@ +# Valkey (Alpine) — environment variables +# Copy this file to .env and adjust values for your environment. + +# Password for client connections. By default Valkey starts with no password +# (any client can connect). To require authentication: +# 1. Set VALKEY_PASSWORD below +# 2. Uncomment the "command" line in docker-compose.yaml +# Clients authenticate with: AUTH +# VALKEY_PASSWORD=valkey diff --git a/compose/valkey/docker-compose.yaml b/compose/valkey/docker-compose.yaml new file mode 100644 index 0000000..45de284 --- /dev/null +++ b/compose/valkey/docker-compose.yaml @@ -0,0 +1,30 @@ +# Docker Compose file for Valkey (Alpine) +# +# Usage: +# docker compose up -d +# +# By default, Valkey starts with no password — any client can connect. +# To require a password, set VALKEY_PASSWORD in your .env file and uncomment +# the "command" line below. Clients must then authenticate with AUTH +# . +# +# Environment variables (see .env.example for details): +# VALKEY_PASSWORD - Optional password for client connections + +services: + valkey: + # For available image tags, see https://hub.docker.com/_/valkey + image: valkey/valkey:9-alpine + container_name: valkey + # To enable password authentication, set VALKEY_PASSWORD in your .env file + # and uncomment the following line: + # command: valkey-server --requirepass ${VALKEY_PASSWORD} + ports: + # Map host port 6379 to container port 6379 (Valkey default). + - "6379:6379" + volumes: + # Persist data beyond container lifetime. + - valkey_data:/data + +volumes: + valkey_data: