# Standalone SMB connector — its own Compose project, next to Onyx. # # Run it on its own (no `-f` injection into the Onyx compose): # # cd smb-connector # docker compose -f docker-compose.standalone.yml up -d --build # # It reaches Onyx over Onyx's existing Docker network. Onyx's compose has # `name: onyx` and no custom network, so its network is `onyx_default`. If your # Onyx project uses a different name, set ONYX_NETWORK to _default. # The connector talks to the API by service name (http://api_server:8080). # # In-container CIFS mounting works the same as before: give the share + # credentials via env (see .env.example). The two capabilities and the # unconfined apparmor profile below are required for mount.cifs in a container. services: smb_connector: build: . image: livtec/aido-smb-connector:local container_name: aido-smb-connector restart: unless-stopped environment: # Reach the Onyx API over the shared network (override if needed). - ONYX_API_URL=${ONYX_API_URL:-http://api_server:8080} env_file: - path: .env required: false networks: - aido-onyx_onyx-networkk # --- required to mount SMB/CIFS shares inside the container --------------- cap_add: - SYS_ADMIN - DAC_READ_SEARCH security_opt: - apparmor:unconfined # If your host's Docker still refuses the mount, use privileged mode instead # of the two cap_add lines above: # privileged: true volumes: # Persist the sync manifest + cached api-key/cc_pair (survives restarts). - ./state:/app/state # Legacy host-mount mode still works: bind-mount a share here and OMIT the # SMB_SOURCE_*_SERVER/_UNC env for that source, e.g. # - /mnt/smb/finance:/mnt/smb/finance:ro logging: driver: json-file options: max-size: "50m" max-file: "6" # Onyx's network, created by the Onyx compose project. Joined as external so # this stays a separate Compose project. Override the name with ONYX_NETWORK. networks: aido-onyx_onyx-network: name: aido-onyx_onyx-network external: true attachable: true