chore(config): remove dragonflydb and update deployment documentation
CI/CD Pipeline / Test (push) Failing after 14m0s
CI/CD Pipeline / Security Scan (push) Successful in 10m59s
CI/CD Pipeline / Build and Push Images (push) Has been skipped

Remove all references to DragonflyDB from the codebase, environment templates, and documentation following its removal from the service architecture. This includes cleaning up Docker configurations, CI/CD workflows, and production guides.

- **Cleanup**: Deleted `dragonfly.conf` and removed DragonflyDB service from `docker-compose.yml`.
- **Environment**: Removed `DRAGONFLY_PASSWORD` and `DRAGONFLY_ADDR` from `.env.example` and `docker-entrypoint.sh`.
- **Documentation**: Updated `README.md`, `PRODUCTION_DEPLOYMENT.md`, and `QUICK_START_PRODUCTION.md` to reflect a 2-service architecture (Trackeep + Postgres).
- **CI/CD**: Updated GitHub Actions to use Go 1.25.
- **Testing**: Updated `test-production.sh` to remove DragonflyDB variable validation.
This commit is contained in:
Tomas Dvorak
2026-05-10 11:25:33 +02:00
parent 6c448b336a
commit 1e377a01b0
9 changed files with 24 additions and 234 deletions
-3
View File
@@ -9,8 +9,5 @@ DB_PASSWORD=your_secure_password_here
DB_USER=trackeep DB_USER=trackeep
DB_NAME=trackeep DB_NAME=trackeep
# DragonflyDB Configuration
DRAGONFLY_PASSWORD=your_dragonfly_password_here
# JWT Secret (generate with: openssl rand -hex 32) # JWT Secret (generate with: openssl rand -hex 32)
JWT_SECRET=your_jwt_secret_here_64_hex_characters_long_exactly JWT_SECRET=your_jwt_secret_here_64_hex_characters_long_exactly
+2 -2
View File
@@ -36,7 +36,7 @@ jobs:
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v4 uses: actions/setup-go@v4
with: with:
go-version: '1.24' go-version: '1.25'
cache: true cache: true
cache-dependency-path: backend/go.sum cache-dependency-path: backend/go.sum
@@ -92,7 +92,7 @@ jobs:
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v4 uses: actions/setup-go@v4
with: with:
go-version: '1.24' go-version: '1.25'
cache: true cache: true
cache-dependency-path: backend/go.sum cache-dependency-path: backend/go.sum
-19
View File
@@ -8,7 +8,6 @@ This guide provides comprehensive instructions for deploying Trackeep to product
### System Requirements ### System Requirements
- Docker 24.0+ and Docker Compose 2.20+ - Docker 24.0+ and Docker Compose 2.20+
- PostgreSQL 15+ - PostgreSQL 15+
- DragonflyDB (Redis-compatible cache)
- 2GB+ RAM minimum (4GB+ recommended) - 2GB+ RAM minimum (4GB+ recommended)
- 20GB+ disk space - 20GB+ disk space
@@ -22,11 +21,6 @@ DB_PASSWORD=<strong-password>
DB_NAME=trackeep DB_NAME=trackeep
DB_SSL_MODE=disable DB_SSL_MODE=disable
# DragonflyDB (Cache)
DRAGONFLY_ADDR=dragonfly:6379
DRAGONFLY_PASSWORD=<strong-password>
DRAGONFLY_PORT=6379
# Security # Security
JWT_SECRET=<generate-with-openssl-rand-base64-32> JWT_SECRET=<generate-with-openssl-rand-base64-32>
ENCRYPTION_KEY=<generate-with-openssl-rand-base64-32> ENCRYPTION_KEY=<generate-with-openssl-rand-base64-32>
@@ -250,19 +244,6 @@ sqlDB.SetConnMaxLifetime(time.Hour)
sqlDB.SetConnMaxIdleTime(10 * time.Minute) sqlDB.SetConnMaxIdleTime(10 * time.Minute)
``` ```
### DragonflyDB Configuration
```yaml
# docker-compose.prod.yml
dragonfly:
command: >
dragonfly
--requirepass=${DRAGONFLY_PASSWORD}
--proactor_threads=4
--maxmemory=2gb
--maxmemory-policy=allkeys-lru
```
### Frontend Optimization ### Frontend Optimization
```bash ```bash
-11
View File
@@ -45,7 +45,6 @@ cp .env.example .env
echo "JWT_SECRET=$(openssl rand -base64 32)" >> .env echo "JWT_SECRET=$(openssl rand -base64 32)" >> .env
echo "ENCRYPTION_KEY=$(openssl rand -base64 32)" >> .env echo "ENCRYPTION_KEY=$(openssl rand -base64 32)" >> .env
echo "DB_PASSWORD=$(openssl rand -base64 24)" >> .env echo "DB_PASSWORD=$(openssl rand -base64 24)" >> .env
echo "DRAGONFLY_PASSWORD=$(openssl rand -base64 24)" >> .env
# Edit .env if needed # Edit .env if needed
nano .env nano .env
@@ -332,16 +331,6 @@ WHERE schemaname NOT IN ('pg_catalog', 'information_schema')
ORDER BY pg_total_relation_size(schemaname||'.'||tablename) DESC; ORDER BY pg_total_relation_size(schemaname||'.'||tablename) DESC;
``` ```
### Cache Optimization
```bash
# Check DragonflyDB stats
docker-compose -f docker-compose.prod.yml exec dragonfly redis-cli -a $DRAGONFLY_PASSWORD INFO
# Clear cache if needed
docker-compose -f docker-compose.prod.yml exec dragonfly redis-cli -a $DRAGONFLY_PASSWORD FLUSHALL
```
## Monitoring ## Monitoring
### Check Service Health ### Check Service Health
+2 -40
View File
@@ -42,12 +42,11 @@ docker run -d \
-e DB_PASSWORD=your_password \ -e DB_PASSWORD=your_password \
-e DB_USER=trackeep \ -e DB_USER=trackeep \
-e DB_NAME=trackeep \ -e DB_NAME=trackeep \
-e DRAGONFLY_PASSWORD=your_dragonfly_password \
-e JWT_SECRET=your_jwt_secret \ -e JWT_SECRET=your_jwt_secret \
ghcr.io/dvorinka/trackeep:latest ghcr.io/dvorinka/trackeep:latest
``` ```
**Note**: This requires external PostgreSQL and DragonflyDB services. For full deployment with included databases, use Docker Compose below. **Note**: This requires an external PostgreSQL database. For a complete deployment with the database included, use Docker Compose below.
### Production Deployment with Docker Compose ### Production Deployment with Docker Compose
@@ -77,7 +76,6 @@ services:
- BACKEND_PORT=8080 - BACKEND_PORT=8080
- DB_HOST=postgres - DB_HOST=postgres
- DB_PORT=5432 - DB_PORT=5432
- DRAGONFLY_ADDR=dragonfly:6379
- GIN_MODE=release - GIN_MODE=release
volumes: volumes:
- ./uploads:/app/uploads - ./uploads:/app/uploads
@@ -86,8 +84,6 @@ services:
depends_on: depends_on:
postgres: postgres:
condition: service_healthy condition: service_healthy
dragonfly:
condition: service_healthy
postgres: postgres:
image: postgres:15-alpine image: postgres:15-alpine
@@ -95,8 +91,6 @@ services:
POSTGRES_DB: ${DB_NAME:-trackeep} POSTGRES_DB: ${DB_NAME:-trackeep}
POSTGRES_USER: ${DB_USER:-trackeep} POSTGRES_USER: ${DB_USER:-trackeep}
POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_PASSWORD: ${DB_PASSWORD}
ports:
- "${DB_HOST_PORT:-5433}:5432"
volumes: volumes:
- postgres_data:/var/lib/postgresql/data - postgres_data:/var/lib/postgresql/data
restart: unless-stopped restart: unless-stopped
@@ -107,31 +101,13 @@ services:
retries: 5 retries: 5
start_period: 30s start_period: 30s
dragonfly:
image: ghcr.io/dragonflydb/dragonfly:latest
ports:
- "${DRAGONFLY_HOST_PORT:-6380}:6379"
volumes:
- dragonfly_data:/data
command: dragonfly --requirepass=${DRAGONFLY_PASSWORD} --proactor_threads=2
environment:
- DRAGONFLY_PASSWORD=${DRAGONFLY_PASSWORD}
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "redis-cli -a ${DRAGONFLY_PASSWORD} ping"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
volumes: volumes:
postgres_data: postgres_data:
dragonfly_data:
``` ```
### Service Architecture ### Service Architecture
Trackeep deployment consists of **3 services**: Trackeep deployment consists of **2 services**:
#### **🎯 Trackeep Service (Unified)** #### **🎯 Trackeep Service (Unified)**
- **Image**: Built from unified Dockerfile (frontend + backend in one) - **Image**: Built from unified Dockerfile (frontend + backend in one)
@@ -142,18 +118,10 @@ Trackeep deployment consists of **3 services**:
#### **🗄️ Database Service** #### **🗄️ Database Service**
- **Image**: `postgres:15-alpine` - **Image**: `postgres:15-alpine`
- **Ports**: `${DB_HOST_PORT:-5433}:5432`
- **Purpose**: Data persistence and storage - **Purpose**: Data persistence and storage
- **Health**: PostgreSQL readiness check - **Health**: PostgreSQL readiness check
- **Storage**: Persistent volume for data - **Storage**: Persistent volume for data
#### **🐉 DragonflyDB Service**
- **Image**: `ghcr.io/dragonflydb/dragonfly:latest`
- **Ports**: `${DRAGONFLY_HOST_PORT:-6380}:6379`
- **Purpose**: In-memory caching and session storage
- **Health**: Redis-cli ping check
- **Storage**: Persistent volume for cache data
### Required Environment Variables ### Required Environment Variables
Create a `.env` file from the provided `.env.example` and configure these required variables: Create a `.env` file from the provided `.env.example` and configure these required variables:
@@ -167,9 +135,6 @@ DB_PASSWORD=your_secure_password_here
DB_USER=trackeep DB_USER=trackeep
DB_NAME=trackeep DB_NAME=trackeep
# DragonflyDB Configuration
DRAGONFLY_PASSWORD=your_dragonfly_password_here
# JWT Secret (generate with: openssl rand -hex 32) # JWT Secret (generate with: openssl rand -hex 32)
JWT_SECRET=your_jwt_secret_here_64_hex_characters_long_exactly JWT_SECRET=your_jwt_secret_here_64_hex_characters_long_exactly
``` ```
@@ -535,9 +500,6 @@ DB_PASSWORD=your_secure_password_here
DB_USER=trackeep DB_USER=trackeep
DB_NAME=trackeep DB_NAME=trackeep
# DragonflyDB Configuration
DRAGONFLY_PASSWORD=your_dragonfly_password_here
# JWT Configuration (generate with: openssl rand -hex 32) # JWT Configuration (generate with: openssl rand -hex 32)
JWT_SECRET=your_jwt_secret_here_64_hex_characters_long_exactly JWT_SECRET=your_jwt_secret_here_64_hex_characters_long_exactly
``` ```
+19 -44
View File
@@ -1,14 +1,31 @@
icon: https://github.com/Dvorinka/Trackeep/raw/main/trackeepfavi_bg.png icon: https://github.com/Dvorinka/Trackeep/raw/main/trackeepfavi_bg.png
services: services:
trackeep:
image: ghcr.io/dvorinka/trackeep:latest
ports:
- "${HOST_PORT:-8080}:8080"
env_file:
- .env
environment:
- BACKEND_PORT=8080
- DB_HOST=postgres
- DB_PORT=5432
- GIN_MODE=release
volumes:
- ./uploads:/app/uploads
- ./data:/data
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
postgres: postgres:
image: postgres:15-alpine image: postgres:15-alpine
environment: environment:
POSTGRES_DB: ${DB_NAME:-trackeep} POSTGRES_DB: ${DB_NAME:-trackeep}
POSTGRES_USER: ${DB_USER:-trackeep} POSTGRES_USER: ${DB_USER:-trackeep}
POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_PASSWORD: ${DB_PASSWORD}
ports:
- "${DB_HOST_PORT:-5433}:5432"
volumes: volumes:
- postgres_data:/var/lib/postgresql/data - postgres_data:/var/lib/postgresql/data
restart: unless-stopped restart: unless-stopped
@@ -19,47 +36,5 @@ services:
retries: 5 retries: 5
start_period: 30s start_period: 30s
dragonfly:
image: ghcr.io/dragonflydb/dragonfly:latest
ports:
- "${DRAGONFLY_HOST_PORT:-6380}:6379"
volumes:
- dragonfly_data:/data
command: dragonfly --requirepass=${DRAGONFLY_PASSWORD} --proactor_threads=2
environment:
- DRAGONFLY_PASSWORD=${DRAGONFLY_PASSWORD}
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "redis-cli -a ${DRAGONFLY_PASSWORD} ping"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
trackeep:
build:
context: .
dockerfile: Dockerfile
ports:
- "${HOST_PORT:-8080}:8080"
env_file:
- .env
environment:
- BACKEND_PORT=8080
- DB_HOST=postgres
- DB_PORT=5432
- DRAGONFLY_ADDR=dragonfly:6379
- GIN_MODE=release
volumes:
- ./uploads:/app/uploads
- ./data:/data
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
dragonfly:
condition: service_healthy
volumes: volumes:
postgres_data: postgres_data:
dragonfly_data:
-2
View File
@@ -12,8 +12,6 @@ export DB_PORT=${DB_PORT:-5432}
export DB_NAME=${DB_NAME:-trackeep} export DB_NAME=${DB_NAME:-trackeep}
export DB_USER=${DB_USER:-trackeep} export DB_USER=${DB_USER:-trackeep}
export DB_PASSWORD=${DB_PASSWORD} export DB_PASSWORD=${DB_PASSWORD}
export DRAGONFLY_ADDR=${DRAGONFLY_ADDR:-dragonfly:6379}
export DRAGONFLY_PASSWORD=${DRAGONFLY_PASSWORD}
export JWT_SECRET=${JWT_SECRET} export JWT_SECRET=${JWT_SECRET}
export GIN_MODE=${GIN_MODE:-release} export GIN_MODE=${GIN_MODE:-release}
-112
View File
@@ -1,112 +0,0 @@
# DragonflyDB Configuration for Trackeep
#
# DragonflyDB is a modern Redis-compatible in-memory database
# Optimized for performance and lower memory usage
# =============================================================================
# NETWORK
# =============================================================================
# Accept connections on all interfaces (safe when behind Docker network)
bind 0.0.0.0
# Default port (same as Redis for compatibility)
port 6379
# TCP listen() backlog
tcp-backlog 511
# Close connection after N seconds of idle time (0 = disabled)
timeout 0
# TCP keepalive
tcp-keepalive 300
# =============================================================================
# SECURITY
# =============================================================================
# Require password for connections
# Set via environment variable: requirepass ${DRAGONFLY_PASSWORD}
requirepass dragonfly123
# Disable dangerous commands in production
rename-command FLUSHDB ""
rename-command FLUSHALL ""
rename-command CONFIG "CONFIG_9f8a2b3c"
rename-command DEBUG ""
rename-command SHUTDOWN "SHUTDOWN_7d4e1f9a"
# =============================================================================
# MEMORY MANAGEMENT
# =============================================================================
# Maximum memory limit (256MB suitable for small-medium deployments)
# DragonflyDB is more memory efficient than Redis
maxmemory 256mb
# Eviction policy when maxmemory is reached
# allkeys-lru: Remove less recently used keys first (recommended for caching)
maxmemory-policy allkeys-lru
# =============================================================================
# PERSISTENCE
# =============================================================================
# Enable AOF persistence (recommended for session durability)
appendonly yes
# AOF file name
appendfilename "appendonly.aof"
# Sync strategy: everysec (recommended balance)
appendfsync everysec
# Auto-rewrite AOF when it grows by X%
auto-aof-rewrite-percentage 100
# Minimum size before auto-rewrite
auto-aof-rewrite-min-size 64mb
# Working directory for persistence
dir /data
# =============================================================================
# CLIENTS & PERFORMANCE
# =============================================================================
# Maximum number of client connections
maxclients 10000
# Number of databases (default 16)
databases 16
# Latency monitoring
latency-monitor-threshold 100
# Slow log (log queries taking > N microseconds)
slowlog-log-slower-than 10000
# Slow log max length
slowlog-max-len 128
# =============================================================================
# LOGGING
# =============================================================================
# Log level: debug, verbose, notice, warning
loglevel notice
# Log file (empty = stdout, good for Docker)
logfile ""
# =============================================================================
# DRAGONFLYDB SPECIFIC OPTIMIZATIONS
# =============================================================================
# Enable DragonflyDB-specific optimizations
# These are automatically enabled in DragonflyDB
# Better memory management
# Improved multi-core utilization
# Enhanced performance for caching workloads
+1 -1
View File
@@ -43,7 +43,7 @@ if [ -f ".env" ]; then
pass "Environment file exists" pass "Environment file exists"
# Check required variables # Check required variables
required_vars=("DB_PASSWORD" "DRAGONFLY_PASSWORD" "JWT_SECRET" "ENCRYPTION_KEY") required_vars=("DB_PASSWORD" "JWT_SECRET" "ENCRYPTION_KEY")
for var in "${required_vars[@]}"; do for var in "${required_vars[@]}"; do
if grep -q "^${var}=" .env && ! grep -q "^${var}=$" .env && ! grep -q "^${var}=<" .env; then if grep -q "^${var}=" .env && ! grep -q "^${var}=$" .env && ! grep -q "^${var}=<" .env; then
pass "$var is set" pass "$var is set"