#Bad audio performance in docker

2 messages · Page 1 of 1 (latest)

errant token

Very bad audio performance in docker, it is acceptable when running directly on a linux vps. Sounds very distorted and laggy. The docker container is linux/amd64. Do you know what I did wrong?

version: "3.8"
services:
  app:
    build: .
    platform: linux/amd64
    image: discord-bot
    ports:
      - "4000:4000"
    depends_on:
      db:
        condition: service_healthy
      redis:
        condition: service_healthy
    env_file:
      - .env
    restart: always

  db:
    image: postgres:15
    platform: linux/amd64
    restart: always
    shm_size: "2g"
    env_file:
      - .env
    environment:
      POSTGRES_PASSWORD: ${PG_PASSWORD}
      POSTGRES_USER: ${PG_USER}
      POSTGRES_DB: ${PG_DATABASE}
    volumes:
      - pgdata:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U ${PG_USER}"]
      interval: 10s
      timeout: 5s
      retries: 5

  redis:
    image: redis:7
    platform: linux/amd64
    restart: always
    command: ["redis-server", "--appendonly", "no", "--save", ""]
    ports:
      - "6379:6379"
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 10s
      timeout: 3s
      retries: 3

volumes:
  pgdata:
FROM node:23

RUN apt-get update && apt-get install -y make g++ python3 ffmpeg sox supervisor \
postgresql-client-common libsodium-dev && rm -rf /var/lib/apt/lists/*

WORKDIR /app
COPY package.json package-lock.json ./

RUN npm install --prefer-offline --omit=dev

COPY . .
EXPOSE 4000
COPY supervisor.conf /etc/supervisor/conf.d/supervisor.conf

CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisor.conf"]
last ploverBOT
  • Consider reading #how-to-get-help to improve your question!
  • Explain what exactly your issue is.
  • Post the full error stack trace, not just the top part!
  • Show your code!
  • Issue solved? Press the button!
  • Marked as resolved by OP