version: '2.4' services: api: image: dilililabs/brainframe:0.24.0 command: >- --dbms "${DBMS:-mysql}" --username user --password password --db-hostname database --journal-max-age "${JOURNAL_MAX_AGE:-7d0h0m}" --capsule-dir /working_dir/capsules --image-storage-dir /image_storage --pruning-age "${PRUNING_AGE:-0d1h0m}" --hostname "${HOSTNAME:-0.0.0.0}" --pruning-fraction "${PRUNING_FRACTION:-0.05}" --license-file /working_dir/license_file --authorize-clients "${AUTHORIZE_CLIENTS:-false}" restart: unless-stopped privileged: true ports: - 5533:5533 environment: - LOGLEVEL=INFO - GST_DEBUG=1 volumes: - "${CUDA_CACHE_PATH:-~/.nv/ComputeCache}:/tmp/ComputeCache" - type: bind source: "./" target: "/working_dir" - "${API_VOLUME_DIR:-./volumes/image_storage}:/image_storage" database: image: mysql/mysql-server:8.0.17 restart: unless-stopped environment: MYSQL_DATABASE: "brainframe" MYSQL_USER: "user" MYSQL_PASSWORD: "password" MYSQL_ROOT_PASSWORD: "password" ports: - "${MYSQL_PORT:-3306}:3306" volumes: - "${MYSQL_VOLUME_DIR:-./volumes/mysql}:/var/lib/mysql/" docs: image: dilililabs/brainframe_docs:0.24.0 restart: unless-stopped dashboard: image: dilililabs/brainframe_dashboard:0.24.0 restart: unless-stopped user: "0" ports: - "3000:3000" volumes: - "${DASHBOARD_VOLUME_DIR:-./volumes/grafana}:/var/lib/grafana" stream_proxy: image: dilililabs/brainframe_stream_proxy:0.24.0 restart: unless-stopped ports: - "${STREAM_PROXY_PORT:-8004}:8004" - "10000-10100:10000-10100" - "8005:8005" # The stream proxy opens a lot of sockets and therefore needs a lot of FDs ulimits: nofile: soft: 999999 hard: 999999 proxy: image: dilililabs/brainframe_proxy:0.24.0 # This fills in the server port dynamically in the nginx configuration file # based on the SERVER_PORT environment variable. See issue BF-1000. entrypoint: /bin/sh -c "envsubst < /confs/docker-compose.conf > /etc/nginx/nginx.conf && exec nginx -c /etc/nginx/nginx.conf" restart: unless-stopped environment: SERVER_PORT: "${SERVER_PORT:-80}" ports: - "${SERVER_PORT:-80}:${SERVER_PORT:-80}"