Skip to content

Commit 44447e8

Browse files
committed
attempt to minimize disk wear from Redis
fix peanut healthcheck
1 parent 351df93 commit 44447e8

13 files changed

Lines changed: 57 additions & 13 deletions

File tree

apps/authentik/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ Identity Provider and SSO solution
44

55
## Configuration
66

7+
### Redis (`authentik-redis`)
8+
9+
Redis runs with **no AOF** and **no RDB** (`save ""`) to limit SSD wear. Cache and sessions are **volatile** across unclean restarts—users may need to **sign in again**. See [redis-persistence-hackstack.md](../../docs/redis-persistence-hackstack.md).
10+
711
### Environment Variables
812

913
Copy `.env.example` to `.env` and configure:

apps/authentik/docker-compose.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,15 @@ services:
33
image: docker.io/library/redis:${REDIS_IMAGE_VERSION:-alpine}
44
container_name: authentik-redis
55
hostname: authentik-redis
6-
command: --save 60 1 --loglevel warning
6+
# No AOF, no RDB: cache/sessions only; users re-login after unclean restart (minimal SSD wear).
7+
command:
8+
- redis-server
9+
- --save
10+
- ""
11+
- --appendonly
12+
- "no"
13+
- --loglevel
14+
- warning
715
restart: unless-stopped
816
healthcheck:
917
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]

apps/event-manager/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Image: [romkey/pdxhackerspace-eventmanager](https://github.com/romkey/pdxhackers
1111
|-----------|------|
1212
| `event-manager` | Rails web server (port 3000, behind reverse proxy) |
1313
| `event-manager-sidekiq` | Sidekiq background job worker |
14-
| `event-manager-redis` | Private Redis instance for job queuing (not shared) |
14+
| `event-manager-redis` | Private Redis for Sidekiq (no AOF; `save 900 1` only—see [redis-persistence-hackstack.md](../../docs/redis-persistence-hackstack.md)) |
1515

1616
## Network dependencies
1717

apps/event-manager/docker-compose.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ services:
3030
container_name: event-manager-redis
3131
hostname: event-manager-redis
3232
restart: unless-stopped
33+
# No AOF; RDB at most every 15m if keys changed (Sidekiq queue may be replay-lost on hard crash).
34+
command:
35+
- redis-server
36+
- --appendonly
37+
- "no"
38+
- --save
39+
- "900"
40+
- "1"
3341
volumes:
3442
- ../../lib/event-manager/redis:/data
3543
networks:

apps/glitchtip/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ PostgreSQL and Redis — no ClickHouse, Kafka, or Snuba required.
1010
|---|---|---|
1111
| `glitchtip` | `glitchtip/glitchtip` | Django web app + API |
1212
| `glitchtip-worker` | `glitchtip/glitchtip` | Celery worker + beat scheduler |
13-
| `glitchtip-redis` | `redis` | Celery broker and cache |
13+
| `glitchtip-redis` | `redis` | Celery broker and cache (no AOF; `save 900 1` only—see [redis-persistence-hackstack.md](../../docs/redis-persistence-hackstack.md)) |
1414
| `glitchtip-migrate` | `glitchtip/glitchtip` | One-shot database migration runner |
1515

1616
## Networks

apps/glitchtip/docker-compose.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ services:
44
container_name: glitchtip-redis
55
hostname: glitchtip-redis
66
restart: unless-stopped
7+
# No AOF; RDB at most every 15m if keys changed (Celery queue may be replay-lost on hard crash).
8+
command:
9+
- redis-server
10+
- --appendonly
11+
- "no"
12+
- --save
13+
- "900"
14+
- "1"
715
volumes:
816
- ../../lib/glitchtip/redis:/data
917
networks:

apps/member-manager/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Image: [romkey/pdxhackerspace-member-manager](https://github.com/romkey/pdxhacke
1111
|-----------|------|
1212
| `member-manager` | Rails web server (port 3000, behind reverse proxy) |
1313
| `member-manager-sidekiq` | Sidekiq background job worker |
14-
| `member-manager-redis` | Private Redis instance for job queuing (not shared) |
14+
| `member-manager-redis` | Private Redis for Sidekiq (no AOF; `save 900 1` only—see [redis-persistence-hackstack.md](../../docs/redis-persistence-hackstack.md)) |
1515

1616
## Network dependencies
1717

apps/member-manager/docker-compose.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ services:
44
container_name: member-manager-redis
55
hostname: member-manager-redis
66
restart: unless-stopped
7+
# No AOF; RDB at most every 15m if keys changed (Sidekiq queue may be replay-lost on hard crash).
8+
command:
9+
- redis-server
10+
- --appendonly
11+
- "no"
12+
- --save
13+
- "900"
14+
- "1"
715
volumes:
816
- ../../lib/member-manager/redis:/data
917
networks:

apps/peanut/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ cp .env.example .env
1717

1818
Configuration files are stored in the `config/` directory.
1919

20+
## Healthcheck
21+
22+
The image defines a working check: `node healthcheck.mjs` hits `http://127.0.0.1:$WEB_PORT/api/ping`. Do not use `wget`/`curl` probes—the runtime image is minimal and may not include them.
23+
2024
## Usage
2125

2226
### Starting the service

apps/peanut/docker-compose.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,7 @@ services:
1212
- proxy
1313
env_file:
1414
- .env
15-
healthcheck:
16-
test: ["CMD-SHELL", "wget -q --spider http://127.0.0.1:8080/ || exit 1"]
17-
interval: 30s
18-
timeout: 10s
19-
retries: 3
20-
start_period: 45s
15+
# Use image HEALTHCHECK: `node healthcheck.mjs` → GET /api/ping (no wget in image; hard-coded :8080 wget fails if WEB_PORT differs).
2116

2217
networks:
2318
proxy:

0 commit comments

Comments
 (0)