services:
  ironmount-dev:
    build:
      context: .
      dockerfile: Dockerfile
      target: development
    container_name: ironmount
    restart: unless-stopped
    cap_add:
      - SYS_ADMIN
    environment:
      - NODE_ENV=development
    ports:
      - "4096:4097"
    devices:
      - /dev/fuse:/dev/fuse
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /run/docker/plugins:/run/docker/plugins
      - /var/lib/docker/volumes/:/var/lib/docker/volumes:rshared
      - ironmount_data:/data

      - ./apps/client/app:/app/apps/client/app
      - ./apps/server/src:/app/apps/server/src

  ironmount-prod:
    build:
      context: .
      dockerfile: Dockerfile
      target: production
    container_name: ironmount
    restart: unless-stopped
    cap_add:
      - SYS_ADMIN
    ports:
      - "4096:4096"
    devices:
      - /dev/fuse:/dev/fuse
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /run/docker/plugins:/run/docker/plugins
      - /var/lib/docker/volumes/:/var/lib/docker/volumes:rshared
      - ironmount_data:/data

volumes:
  ironmount_data:
    driver: local
