Files
drip/docker-compose.release.yml
Gouryella 7283180e6a perf(client): Optimize client performance and introduce a data frame processing worker pool
- Add runtime performance optimization configurations to main.go, including setting GOMAXPROCS, adjusting GC frequency, and memory limits.

- Implement a worker pool-based data frame processing mechanism in connector.go to improve processing capabilities under high concurrency.

- Adjust frame writer configuration to improve batch write efficiency and enable adaptive refresh strategy.

- Add callback handling support for write errors to enhance connection stability.

refactor(server): Introduce an adaptive buffer pool to optimize memory usage

- Add adaptive_buffer_pool.go to implement large and small buffer reuse, reducing memory allocation overhead.

- Apply buffer pool management for large/medium temporary buffers in proxy handlers and TCP connections.

- Change the HTTP response writer to a cached bufio.Writer to improve I/O performance.

- Optimize HTTP request reading logic and response sending process.

build(docker): Update mount paths and remove unused named volumes

- Modify the data directory mount method in docker-compose.release.yml. ./data:/app/data

- Remove the unnecessary drip-data named volume definition

test(script): Add performance testing and profiling scripts

- Add profile-test.sh script for automating stress testing and performance data collection

- Supports collecting pprof data such as CPU, stack traces, and coroutines and generating analysis reports
2025-12-08 12:24:42 +08:00

69 lines
1.5 KiB
YAML

# Docker Compose for deploying drip-server from GitHub Release
#
# Usage:
# 1. Copy this file to your server
# 2. Create .env file with your settings (see .env.example below)
# 3. Run: docker compose -f docker-compose.release.yml up -d
#
# Environment variables (.env.example):
# DOMAIN=tunnel.example.com
# AUTH_TOKEN=your-secret-token
# VERSION=latest
# TZ=UTC
services:
drip-server:
image: ghcr.io/gouryella/drip:${VERSION:-latest}
container_name: drip-server
restart: unless-stopped
ports:
- "443:443"
- "20000-20100:20000-20100" # TCP tunnel ports
volumes:
- ./certs:/app/data/certs:ro
- ./data:/app/data
environment:
TZ: ${TZ:-UTC}
command: >
server
--domain ${DOMAIN:-tunnel.localhost}
--port 443
--tls-cert /app/data/certs/fullchain.pem
--tls-key /app/data/certs/privkey.pem
--token ${AUTH_TOKEN:-}
--tcp-port-min 20000
--tcp-port-max 20100
networks:
- drip-net
logging:
driver: json-file
options:
max-size: 10m
max-file: "3"
deploy:
resources:
limits:
cpus: '2'
memory: 512M
reservations:
cpus: '0.25'
memory: 64M
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:443/health"]
interval: 30s
timeout: 3s
retries: 3
start_period: 10s
networks:
drip-net:
driver: bridge