version: '3.8'

services:
  spaces-app:
    build: .
    privileged: true  # Required for Docker-in-Docker
    ports:
      - "2593:80"      # Nginx proxy
    volumes:
      - docker-data:/var/lib/docker  # Docker storage volume
      - /sys/fs/cgroup:/sys/fs/cgroup:rw  # Fix cgroupv2 support
    environment:
      - NODE_ENV=development
      - DOCKER_HOST=unix:///var/run/docker.sock
      - DOCKER_TLS_CERTDIR=""
    restart: unless-stopped
    cgroup: host  # Use host cgroup namespace
volumes:
  docker-data:
