version: '3.8' services: samcloud-filebrowser-dev: image: node:20-alpine working_dir: /app/frontend environment: - NODE_ENV=development - VITE_DEV_SERVER=true volumes: # Mount the entire frontend source for live editing - "./src/frontend:/app/frontend" # Also mount config and data volumes (same as production) - "/Volumes/SamMgmt/Containers/SamCloud FileBrowser/config:/config" - type: bind source: "/Volumes/Sam Storage" target: "/data/Sam Storage" - type: bind source: "/Volumes/SamMgmt" target: "/data/SamMgmt" - type: bind source: "/Volumes/SamCloud Prod" target: "/data/SamCloud Prod" - type: bind source: /Users/sammacmini target: /data/sammacmini - "/Volumes/SamMgmt/Containers/SamCloud FileBrowser/branding:/branding" ports: - "5174:5173" # Vite dev server command: sh -c "npm install && npm run dev -- --host 0.0.0.0 --port 5173" restart: unless-stopped networks: - npm_network # Keep the production FileBrowser running for the backend samcloud-filebrowser: build: context: ./src dockerfile: Dockerfile.samcloud container_name: samcloud-filebrowser ports: - "8383:8080" volumes: - "/Volumes/SamMgmt/Containers/SamCloud FileBrowser/config:/config" - type: bind source: "/Volumes/Sam Storage" target: "/data/Sam Storage" - type: bind source: "/Volumes/SamMgmt" target: "/data/SamMgmt" - type: bind source: "/Volumes/SamCloud Prod" target: "/data/SamCloud Prod" - type: bind source: /Users/sammacmini target: /data/sammacmini - "/Volumes/SamMgmt/Containers/SamCloud FileBrowser/branding:/branding" environment: - FB_CONFIG=/config/filebrowser.json - PUID=501 - PGID=20 restart: unless-stopped networks: - npm_network networks: npm_network: external: true