#!/bin/bash set -e echo "Building Craftstation with embedded assets..." # The script's directory cd "$(dirname "$0")" echo "Building frontend and Go binary with embedded assets..." go generate go build -o craftstation -ldflags="-s -w" bin.go echo "Building docker image..." docker compose build echo "Build complete! Binary created: ./craftstation" echo "Run with: ./craftstation" echo "Note: Binary contains embedded frontend assets and will auto-install Bun if not found" echo "Server runs on port 3000 (or PORT env var)"