Refactored penpot to use its own redis instance

This commit is contained in:
2026-06-20 17:07:37 +02:00
parent 909f636cb0
commit 19653b0fdf
+28 -8
View File
@@ -18,7 +18,7 @@ networks:
volumes: volumes:
penpot_assets: penpot_assets:
penpot_postgres_v15: # Added to persist your local database tables across container restarts penpot_postgres_v15:
services: services:
penpot-frontend: penpot-frontend:
@@ -48,7 +48,9 @@ services:
- "6060:6060" - "6060:6060"
depends_on: depends_on:
penpot-postgres: penpot-postgres:
condition: service_healthy # Binds initialization order to a healthy local database condition: service_healthy # Wait for database stability
penpot-valkey:
condition: service_healthy # Wait for internal caching layer stability
environment: environment:
<< : [*penpot-flags, *penpot-public-uri, *penpot-http-body-size, *penpot-secret-key] << : [*penpot-flags, *penpot-public-uri, *penpot-http-body-size, *penpot-secret-key]
@@ -60,8 +62,8 @@ services:
PENPOT_DATABASE_USERNAME: penpot PENPOT_DATABASE_USERNAME: penpot
PENPOT_DATABASE_PASSWORD: penpot PENPOT_DATABASE_PASSWORD: penpot
## Valkey/Redis parameters routed directly to your active k3s node ## Local Caching Layer connection parameter
PENPOT_REDIS_URI: ${PENPOT_REDIS_URI} PENPOT_REDIS_URI: redis://penpot-valkey/0
## Storage Settings ## Storage Settings
PENPOT_OBJECTS_STORAGE_BACKEND: fs PENPOT_OBJECTS_STORAGE_BACKEND: fs
@@ -79,7 +81,10 @@ services:
penpot-exporter: penpot-exporter:
image: "penpotapp/exporter:${PENPOT_VERSION:-latest}" image: "penpotapp/exporter:${PENPOT_VERSION:-latest}"
restart: always restart: always
shm_size: '2gb' # Retained to protect Puppeteer rendering processes from memory crashes shm_size: '2gb' # Protects Puppeteer rendering processes from memory crashes
depends_on:
penpot-valkey:
condition: service_healthy
networks: networks:
- penpot-net - penpot-net
environment: environment:
@@ -87,9 +92,9 @@ services:
PENPOT_EXPORTER_SECRET_KEY: ${PENPOT_EXPORTER_SECRET_KEY} PENPOT_EXPORTER_SECRET_KEY: ${PENPOT_EXPORTER_SECRET_KEY}
PENPOT_PUBLIC_URI: http://penpot-frontend:8080 PENPOT_PUBLIC_URI: http://penpot-frontend:8080
## Valkey/Redis variables duplicated to satisfy background exporter sub-engines ## Local Caching Layer connections for the exporter sub-engine
PENPOT_REDIS_URI: ${PENPOT_REDIS_URI} PENPOT_REDIS_URI: redis://penpot-valkey/0
PENPOT_REDIS_URL: ${PENPOT_REDIS_URI} PENPOT_REDIS_URL: redis://penpot-valkey/0
PENPOT_FLAGS: disable-sandbox PENPOT_FLAGS: disable-sandbox
# Integrated isolated Database Service # Integrated isolated Database Service
@@ -112,3 +117,18 @@ services:
timeout: 10s timeout: 10s
retries: 5 retries: 5
start_period: 2s start_period: 2s
# Integrated isolated Caching Engine (Valkey drop-in for Redis)
penpot-valkey:
image: valkey/valkey:8.1
restart: always
networks:
- penpot-net
environment:
- VALKEY_EXTRA_FLAGS=--maxmemory 128mb --maxmemory-policy volatile-lfu
healthcheck:
test: ["CMD-SHELL", "valkey-cli ping | grep PONG"]
interval: 1s
timeout: 3s
retries: 5
start_period: 3s