version: "3.9" # Standalone docker-compose with external PostgreSQL, Redis, and RabbitMQ # Works independently without Runtipi - recommended for production services: onlyoffice-docs: image: onlyoffice/documentserver:8.2 container_name: onlyoffice-docs restart: unless-stopped depends_on: onlyoffice-db: condition: service_healthy onlyoffice-redis: condition: service_healthy onlyoffice-rabbitmq: condition: service_healthy ports: - "${ONLYOFFICE_PORT:-8044}:80" environment: # JWT Configuration - JWT_ENABLED=${JWT_ENABLED:-true} - JWT_SECRET=${JWT_SECRET:?JWT_SECRET is required} - JWT_HEADER=${JWT_HEADER:-Authorization} - JWT_IN_BODY=${JWT_IN_BODY:-false} # Database Configuration - DB_TYPE=postgres - DB_HOST=onlyoffice-db - DB_PORT=5432 - DB_NAME=onlyoffice - DB_USER=onlyoffice - DB_PWD=${DB_PASSWORD:-onlyoffice} # Redis Configuration - REDIS_SERVER_HOST=onlyoffice-redis - REDIS_SERVER_PORT=6379 # RabbitMQ Configuration - AMQP_URI=amqp://guest:guest@onlyoffice-rabbitmq:5672/ - AMQP_TYPE=rabbitmq # Storage Configuration - USE_UNAUTHORIZED_STORAGE=${USE_UNAUTHORIZED_STORAGE:-false} # WOPI Configuration - WOPI_ENABLED=${WOPI_ENABLED:-false} # Performance tuning - NGINX_WORKER_PROCESSES=auto - NGINX_WORKER_CONNECTIONS=4096 # Font generation - GENERATE_FONTS=true volumes: # Logs - ./data/logs:/var/log/onlyoffice # Certificates and data - ./data/data:/var/www/onlyoffice/Data # File cache - ./data/lib:/var/lib/onlyoffice # Custom fonts (optional) - ./data/fonts:/usr/share/fonts/truetype/custom healthcheck: test: ["CMD", "curl", "-f", "http://localhost/healthcheck"] interval: 30s timeout: 10s retries: 3 start_period: 60s onlyoffice-db: image: postgres:15-alpine container_name: onlyoffice-db restart: unless-stopped environment: - POSTGRES_DB=onlyoffice - POSTGRES_USER=onlyoffice - POSTGRES_PASSWORD=${DB_PASSWORD:-onlyoffice} volumes: - ./data/postgresql:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U onlyoffice -d onlyoffice"] interval: 10s timeout: 5s retries: 5 start_period: 10s onlyoffice-redis: image: redis:7-alpine container_name: onlyoffice-redis restart: unless-stopped volumes: - ./data/redis:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 10s timeout: 5s retries: 5 start_period: 10s onlyoffice-rabbitmq: image: rabbitmq:3-alpine container_name: onlyoffice-rabbitmq restart: unless-stopped volumes: - ./data/rabbitmq:/var/lib/rabbitmq healthcheck: test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"] interval: 10s timeout: 5s retries: 5 start_period: 30s