Skip to content

Commit 5796f85

Browse files
Redis compatibility fixed
1 parent b152ed0 commit 5796f85

10 files changed

Lines changed: 290 additions & 113 deletions

File tree

.env.secret.example

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
1-
# .env.secret — sensitive values for docker-compose.k8s.yml
1+
# .env.secret — sensitive values for docker-compose
22
#
33
# !! DO NOT COMMIT THIS FILE TO GIT !!
44
# Add to .gitignore: echo ".env.secret" >> .gitignore
55
#
66
# Copy this file to .env.secret and fill in real values.
7+
# Passwords below match the hashes in docker/config/vcache.acl.
78

8-
# VoidCache password (leave blank to disable auth)
9-
VC_PASSWORD=
9+
# VoidCache passwords (must match hashes in vcache.acl)
10+
VC_PASSWORD_ADMIN=adminpass
11+
VC_PASSWORD_APP=apppass
12+
VC_PASSWORD_READER=readonly
13+
VC_PASSWORD_DEFAULT=secret
14+
15+
# Simple single-password mode (overrides ACL; leave blank to use ACL file)
16+
# VC_PASSWORD=
1017

1118
# Registry credentials (only needed for private registries)
1219
# REGISTRY=ghcr.io/yourorg

BUILD.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
## 1. Create the secrets file
2+
3+
```bash
4+
# In PowerShell — run from the project root
5+
# Leave VC_PASSWORD blank to use the ACL file instead
6+
Copy-Item docker\.env docker\.env.local
7+
```
8+
The ACL file at `docker\config\vcache.acl`
9+
already has the correct credentials.
10+
You don't need to set VC_PASSWORD unless you want simple password-only mode.
11+
12+
## 2. Build and start
13+
14+
```bash
15+
# Open PowerShell in the project root folder
16+
# (right-click the folder → "Open in Terminal")
17+
18+
docker compose -f docker\docker-compose.yml up --build -d
19+
```
20+
First build takes 2–3 minutes (downloads Ubuntu base, compiles C source). Subsequent builds are ~20 seconds.
21+
22+
3. Check that all containers are healthy
23+
```bash
24+
docker compose -f docker\docker-compose.yml ps
25+
```
26+
27+
Wait ~30 seconds after start. All four containers (vcache-1, vcache-2, vcache-3, vcache-haproxy) should show healthy or running.
28+
29+
Connect on localhost:6379 (HAProxy) — this is what StackExchange.Redis and RedisInsight should point at.
30+
```
31+
Port map
32+
Port What Who connects here
33+
6379 HAProxy — main entry point Your app RedisInsight redis-cli
34+
8404 HAProxy stats UI Browser → http://localhost:8404/stats (user: admin / pass: admin)
35+
6381 vcache-0 /
36+
```

docker/.env

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ VC_MAXMEMORY=512m
1515
VC_THREADS=4
1616

1717
# Simple password — set to enable AUTH on all nodes (leave blank to disable)
18-
# VC_PASSWORD=changeme_in_production
18+
# VC_PASSWORD=secret # matches 'default' user in vcache.acl
19+
# VC_PASSWORD_ADMIN=adminpass # matches 'admin' user in vcache.acl
1920

2021
# Set to "1" to run nodes without WAL persistence (faster, no durability)
2122
VC_NO_WAL=0

docker/.env.local

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# .env – VoidCache Docker environment defaults
2+
#
3+
# Copy to .env and edit before running docker compose up.
4+
# All values can also be passed as shell environment variables.
5+
#
6+
# ─────────────────────────────────────────────────────────────────────────────
7+
8+
# Port exposed on the host for the HAProxy load balancer
9+
VC_PORT=6379
10+
11+
# Memory cap per node (supports k, m, g suffixes)
12+
VC_MAXMEMORY=512m
13+
14+
# Worker threads per node (set to CPU cores for best perf)
15+
VC_THREADS=4
16+
17+
# Simple password — set to enable AUTH on all nodes (leave blank to disable)
18+
# VC_PASSWORD=secret # matches 'default' user in vcache.acl
19+
# VC_PASSWORD_ADMIN=adminpass # matches 'admin' user in vcache.acl
20+
21+
# Set to "1" to run nodes without WAL persistence (faster, no durability)
22+
VC_NO_WAL=0

docker/config/vcache.acl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
# Example users:
1717
#
1818
# Full-access admin (password: "adminpass")
19-
admin 3ba05beee8a9d6c6c5e99bf49e6a17eb6d7f9a5ad5b5bfc14f7c5b0a8d1f2c3 *
19+
admin 713bfda78870bf9d1b261f565286f85e97ee614efe5f0faf7c34e7ca4f65baca *
2020
#
2121
# Read-only service account (password: "readonly")
22-
reader e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 r
22+
reader 8171bacf32668a8f44b90087ad107ed63170f57154763ba7e44047bf9e5a7be3 r
2323
#
2424
# Application account with read+write (password: "apppass")
25-
app 5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8 rw
25+
app 46400f642c99584e51b14031f875ca9b7b33ccf94ff8d7657197a5bac06f4ffb rw
2626
#
2727
# Default user (no-username AUTH <password>) password: "secret"
2828
default 2bb80d537b1da3e38bd30361aa855686bde0eacd7162fef6a25fe97bf527a25b rw

0 commit comments

Comments
 (0)