diff --git a/komodo/automate/bambuddy/.env.sample b/komodo/automate/bambuddy/.env.sample new file mode 100644 index 0000000..27caea9 --- /dev/null +++ b/komodo/automate/bambuddy/.env.sample @@ -0,0 +1,3 @@ +PG_USER=bambuddy +PG_PASS=changeme +DATA_PATH=/mnt/data \ No newline at end of file diff --git a/komodo/automate/bambuddy/compose.yaml b/komodo/automate/bambuddy/compose.yaml new file mode 100644 index 0000000..e99fe64 --- /dev/null +++ b/komodo/automate/bambuddy/compose.yaml @@ -0,0 +1,38 @@ +services: + bambuddy: + image: ghcr.io/maziggy/bambuddy:latest + build: . + # Usage: + # docker compose up -d → pulls pre-built image + # docker compose up -d --build → builds from source + container_name: bambuddy + network_mode: host # Recommended for automatic printer discovery + volumes: + - bambuddy_data:/app/data + - bambuddy_logs:/app/logs + - ${DATA_PATH}/media/projects:/external/nas + environment: + - TZ=America/Toronto # Your timezone + - DATABASE_URL=postgresql://${PG_USER:-bambuddy}:${PG_PASS:?database password required}@postgres:5432/bambuddy + - TRUSTED_FRAME_ORIGINS=http://homeassistant.local:8123 + - BAMBUDDY_EXTERNAL_ROOTS=/external/nas + restart: unless-stopped + # Docker SIGKILLs after 10s by default. Bambuddy stops well inside that, + # but the headroom means a slow teardown (several virtual printers on a Pi) + # can still checkpoint the database instead of being killed mid-write. + stop_grace_period: 30s + postgres: + image: postgres:16-alpine + container_name: bambuddy-db + restart: unless-stopped + environment: + POSTGRES_USER: ${PG_USER:-bambuddy} + POSTGRES_PASSWORD: ${PG_PASS:?database password required} + POSTGRES_DB: bambuddy + volumes: + - bambuddy_pgdata:/var/lib/postgresql/data + ports: + - "5432:5432" +volumes: + bambuddy_data: + bambuddy_logs: \ No newline at end of file