mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-09-30 11:12:35 +02:00
Manually configure AMS slots for third-party or generic filaments: 1. Hover over an AMS slot on the printer card 2. Click the menu button (:material-dots-vertical:) that appears 3. Select **Configure Slot** 4. Choose a filament preset from your Bambu Studio cloud presets 5. Select a matching K profile (pressure advance calibration) 6. Optionally set a custom color using the color picker 7. Click **Configure Slot** to apply **Color Picker Features:** - Enter custom hex codes or color names (e.g., "brown", "FF8800") - Live preview of selected color - Expandable color picker in Configure AMS Slot modal: - 8 basic colors shown by default - 24 additional colors available via expand button - Tests for ConfigureAmsSlotModal component - Tests for AMS change callback - Updated README with AMS slot configuration feature - Wiki documentation for Configure AMS Slot feature - Multi plate issue where plate names showed incorrect. #93 - Items from Queue end up as "source" files in archive. #107 - Added env variable support to change network port. #108 Docs -> https://wiki.bambuddy.cool/getting-started/docker/?h=port#custom-port
58 lines
1.5 KiB
Docker
58 lines
1.5 KiB
Docker
# Build frontend
|
|
FROM node:22-bookworm-slim AS frontend-builder
|
|
|
|
WORKDIR /app/frontend
|
|
|
|
# Copy package files first for better caching
|
|
COPY frontend/package*.json ./
|
|
|
|
# Use cache mount for npm
|
|
RUN --mount=type=cache,target=/root/.npm \
|
|
npm ci
|
|
|
|
COPY frontend/ ./
|
|
RUN npm run build
|
|
|
|
# Production image
|
|
FROM python:3.13-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# Install system dependencies
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
curl \
|
|
ffmpeg \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install Python dependencies with cache mount
|
|
COPY requirements.txt ./
|
|
RUN --mount=type=cache,target=/root/.cache/pip \
|
|
pip install --root-user-action=ignore -r requirements.txt
|
|
|
|
# Copy backend
|
|
COPY backend/ ./backend/
|
|
|
|
# Copy built frontend from builder stage
|
|
COPY --from=frontend-builder /app/static ./static
|
|
|
|
# Create data directory for persistent storage
|
|
RUN mkdir -p /app/data /app/logs
|
|
|
|
# Environment variables
|
|
ENV PYTHONUNBUFFERED=1
|
|
ENV DATA_DIR=/app/data
|
|
ENV LOG_DIR=/app/logs
|
|
ENV PORT=8000
|
|
|
|
EXPOSE 8000
|
|
|
|
# Health check (uses PORT env var via shell)
|
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \
|
|
CMD python -c "import urllib.request, os; urllib.request.urlopen(f'http://localhost:{os.environ.get(\"PORT\", \"8000\")}/health')" || exit 1
|
|
|
|
# Run the application
|
|
# Use standard asyncio loop (uvloop has permission issues in some Docker environments)
|
|
# Port is configurable via PORT environment variable (default: 8000)
|
|
CMD sh -c "uvicorn backend.app.main:app --host 0.0.0.0 --port ${PORT:-8000} --loop asyncio"
|