Files
mindesbunister d7c6bc8375 Phase 0: Performance Quick Wins
Implemented comprehensive performance optimizations across 7 services:

Redis Caching:
- Firefly III: Added Redis cache for sessions and application cache (84.6% hit rate)
- Gitea: Configured Redis for cache, sessions, and task queues
- Synapse: Enabled Redis cache for Matrix homeserver
- Nextcloud: Already had Redis, added tmpfs and proper container naming

Database Tuning:
- Zabbix: Added MySQL tuning (existing performance.cnf with 3GB buffer already optimal)
- Paperless: MariaDB tuning (256MB buffer, 64MB log, 50 connections)
- Trading Bot: PostgreSQL tuning (128MB shared_buffers, optimized work_mem)
- Firefly III: MariaDB optimization (512MB buffer, 128MB log, 100 connections)

Tmpfs Mounts (in-memory temporary storage):
- Nextcloud: 1GB /tmp, 512MB /var/tmp
- Paperless: 512MB /tmp, 256MB /var/tmp
- Jellyfin: 2GB /tmp, 1GB /var/tmp (for transcoding)

Container Naming:
- Nextcloud: Renamed from compose_files_* to nextcloud-redis, nextcloud-db, nextcloud-app

Documentation:
- Updated INFRASTRUCTURE_ROADMAP.md with Phase 0 section and completion tracking
- Created PERFORMANCE_IMPROVEMENTS_2025-11-12.md with detailed change log
- Created deploy-performance-improvements.sh automation script

All services verified healthy and running with improvements.
2025-11-13 10:18:10 +01:00

154 lines
4.2 KiB
YAML

# Firefly III - Personal Finance Manager
# https://docs.firefly-iii.org/how-to/firefly-iii/installation/docker/
services:
firefly-redis:
image: redis:alpine
hostname: firefly-redis
container_name: firefly_iii_redis
restart: unless-stopped
volumes:
- firefly_redis_data:/data
networks:
- firefly-network
logging:
driver: loki
options:
loki-url: "http://localhost:3100/loki/api/v1/push"
firefly:
image: fireflyiii/core:latest
hostname: firefly
container_name: firefly_iii_core
restart: unless-stopped
ports:
- "8094:8080"
volumes:
- /home/icke/firefly/upload:/var/www/html/storage/upload
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
environment:
# Application settings
- APP_KEY=pxhYxHRvrt84ocbN42vy8Tn9CcmP5EnC
- APP_ENV=local
- APP_DEBUG=false
- SITE_OWNER=admin@example.com
- APP_URL=http://localhost:8094
- TRUSTED_PROXIES=**
# Database settings (MariaDB)
- DB_CONNECTION=mysql
- DB_HOST=firefly-db
- DB_PORT=3306
- DB_DATABASE=firefly
- DB_USERNAME=firefly
- DB_PASSWORD=firefly_secure_password_123
# Cache settings - OPTIMIZED with Redis
- CACHE_DRIVER=redis
- SESSION_DRIVER=redis
- REDIS_HOST=firefly-redis
- REDIS_PORT=6379
- REDIS_PASSWORD=
- REDIS_DB=0
- REDIS_CACHE_DB=1
# Email settings (optional - configure for notifications)
# - MAIL_MAILER=smtp
# - MAIL_HOST=smtp.example.com
# - MAIL_PORT=587
# - MAIL_FROM=noreply@example.com
# - MAIL_USERNAME=your_email@example.com
# - MAIL_PASSWORD=your_email_password
# - MAIL_ENCRYPTION=tls
# Localization
- DEFAULT_LANGUAGE=en_US
- DEFAULT_LOCALE=equal
- TZ=Europe/Berlin
# Security
- AUTHENTICATION_GUARD=web
- AUTHENTICATION_GUARD_EMAIL=email
# Webhooks
- ALLOW_WEBHOOKS=true
# Cron Job Token (must be exactly 32 characters)
- STATIC_CRON_TOKEN=oVFRBboIBlZPRgc5HYHA5Hevrg68VaTV
# Other settings
- LOG_CHANNEL=stack
- APP_LOG_LEVEL=info
- AUDIT_LOG_LEVEL=info
depends_on:
- firefly-db
- firefly-redis
networks:
- firefly-network
logging:
driver: loki
options:
loki-url: "http://localhost:3100/loki/api/v1/push"
firefly-db:
image: mariadb:lts
hostname: firefly-db
container_name: firefly_iii_db
restart: unless-stopped
command: --innodb-buffer-pool-size=512M --innodb-log-file-size=128M --max-connections=100
environment:
- MYSQL_RANDOM_ROOT_PASSWORD=yes
- MYSQL_DATABASE=firefly
- MYSQL_USER=firefly
- MYSQL_PASSWORD=firefly_secure_password_123
volumes:
- /home/icke/firefly/db:/var/lib/mysql
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
networks:
- firefly-network
logging:
driver: loki
options:
loki-url: "http://localhost:3100/loki/api/v1/push"
firefly-cron:
# Cron job container for automated tasks
# Set STATIC_CRON_TOKEN in environment - must be exactly 32 characters
image: alpine
hostname: firefly-cron
container_name: firefly_iii_cron
restart: unless-stopped
environment:
- TZ=Europe/Berlin
- STATIC_CRON_TOKEN=oVFRBboIBlZPRgc5HYHA5Hevrg68VaTV
command: >-
sh -c "apk add --no-cache tzdata wget curl &&
ln -fs /usr/share/zoneinfo/$$TZ /etc/localtime &&
echo 'Starting Firefly III cron job scheduler...' &&
echo \"0 3 * * * wget -qO- http://firefly:8080/api/v1/cron/$$STATIC_CRON_TOKEN 2>&1 | logger -t firefly-cron\" | crontab - &&
echo 'Cron job installed. Next run: 03:00 daily' &&
crond -f -L /dev/stdout"
networks:
- firefly-network
depends_on:
- firefly
logging:
driver: loki
options:
loki-url: "http://localhost:3100/loki/api/v1/push"
networks:
firefly-network:
driver: bridge
ipam:
config:
- subnet: 172.50.0.0/28
volumes:
firefly_upload:
firefly_db:
firefly_redis_data: