mirror of
https://github.com/Dvorinka/Trackeep.git
synced 2026-06-03 20:12:58 +00:00
9a580c77d2
- Replace Redis with DragonflyDB for better performance and memory efficiency - Remove redundant environment variables (POSTGRES_*, ENCRYPTION_KEY, OAUTH_SERVICE_URL) - Consolidate database configuration to use single DB_* variables - Use JWT_SECRET for both JWT tokens and encryption - Remove PORT variable redundancy, use BACKEND_PORT consistently - Clean up docker-compose configurations for dev/prod consistency - Add DragonflyDB configuration with optimized memory usage - Remove redis.conf as it's no longer needed - Update health checks to use Redis-compatible CLI for DragonflyDB
120 lines
3.4 KiB
YAML
120 lines
3.4 KiB
YAML
services:
|
|
trackeep-frontend:
|
|
image: 'ghcr.io/dvorinka/trackeep/frontend:latest'
|
|
ports:
|
|
- "${FRONTEND_PORT:-80}:80"
|
|
- "${HTTPS_PORT:-443}:443"
|
|
environment:
|
|
- NODE_ENV=production
|
|
- VITE_DEMO_MODE=${VITE_DEMO_MODE:-false}
|
|
- FRONTEND_PORT=${FRONTEND_PORT:-80}
|
|
- BACKEND_PORT=${BACKEND_PORT:-8080}
|
|
depends_on:
|
|
- trackeep-backend
|
|
restart: unless-stopped
|
|
networks:
|
|
- trackeep-network
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pgrep nginx > /dev/null || exit 1"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 20s
|
|
|
|
trackeep-backend:
|
|
image: 'ghcr.io/dvorinka/trackeep/backend:latest'
|
|
ports:
|
|
- "${BACKEND_PORT:-8080}:${BACKEND_PORT:-8080}"
|
|
environment:
|
|
- BACKEND_PORT=${BACKEND_PORT:-8080}
|
|
- FRONTEND_PORT=${FRONTEND_PORT:-80}
|
|
- GIN_MODE=${GIN_MODE:-release}
|
|
- DB_TYPE=${DB_TYPE:-postgres}
|
|
- DB_HOST=${DB_HOST:-postgres}
|
|
- DB_PORT=${DB_PORT:-5432}
|
|
- DB_USER=${DB_USER:-trackeep}
|
|
- DB_PASSWORD=${DB_PASSWORD}
|
|
- DB_NAME=${DB_NAME:-trackeep}
|
|
- DB_SSL_MODE=${DB_SSL_MODE:-disable}
|
|
- JWT_SECRET=${JWT_SECRET}
|
|
- JWT_EXPIRES_IN=${JWT_EXPIRES_IN:-24h}
|
|
- UPLOAD_DIR=${UPLOAD_DIR:-./uploads}
|
|
- MAX_FILE_SIZE=${MAX_FILE_SIZE:-10485760}
|
|
- 'CORS_ALLOWED_ORIGINS=${CORS_ALLOWED_ORIGINS:-*}'
|
|
- VITE_DEMO_MODE=${VITE_DEMO_MODE:-false}
|
|
- SEARCH_API_PROVIDER=${SEARCH_API_PROVIDER:-demo}
|
|
- SEARCH_RESULTS_LIMIT=${SEARCH_RESULTS_LIMIT:-10}
|
|
- AUTO_UPDATE_CHECK=${AUTO_UPDATE_CHECK:-false}
|
|
- UPDATE_CHECK_INTERVAL=${UPDATE_CHECK_INTERVAL:-24h}
|
|
- PRERELEASE_UPDATES=${PRERELEASE_UPDATES:-false}
|
|
- DRAGONFLY_ADDR=${DRAGONFLY_ADDR:-dragonfly:6379}
|
|
- DRAGONFLY_PASSWORD=${DRAGONFLY_PASSWORD}
|
|
volumes:
|
|
- './data:/data'
|
|
- './uploads:/app/uploads'
|
|
- './logs:/app/logs'
|
|
- '/var/run/docker.sock:/var/run/docker.sock'
|
|
restart: unless-stopped
|
|
networks:
|
|
- trackeep-network
|
|
healthcheck:
|
|
test:
|
|
- CMD
|
|
- wget
|
|
- '--no-verbose'
|
|
- '--tries=1'
|
|
- '--spider'
|
|
- "http://localhost:${BACKEND_PORT:-8080}/health"
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
postgres:
|
|
image: 'postgres:15-alpine'
|
|
ports:
|
|
- "${DB_PORT:-5432}:5432"
|
|
environment:
|
|
POSTGRES_DB: ${DB_NAME:-trackeep}
|
|
POSTGRES_USER: ${DB_USER:-trackeep}
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
|
volumes:
|
|
- 'postgres_data:/var/lib/postgres/data'
|
|
restart: unless-stopped
|
|
networks:
|
|
- trackeep-network
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-trackeep} -d ${DB_NAME:-trackeep}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 30s
|
|
|
|
dragonfly:
|
|
image: ghcr.io/dragonflydb/dragonfly:latest
|
|
container_name: dragonfly
|
|
ports:
|
|
- "${DRAGONFLY_PORT:-6379}:6379"
|
|
volumes:
|
|
- dragonfly_data:/data
|
|
command: dragonfly --requirepass=${DRAGONFLY_PASSWORD} --proactor_threads=2
|
|
environment:
|
|
- DRAGONFLY_PASSWORD=${DRAGONFLY_PASSWORD}
|
|
restart: unless-stopped
|
|
networks:
|
|
- trackeep-network
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "redis-cli -a ${DRAGONFLY_PASSWORD} ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 30s
|
|
|
|
volumes:
|
|
postgres_data: null
|
|
dragonfly_data: null
|
|
|
|
networks:
|
|
trackeep-network:
|
|
driver: bridge
|