#!/bin/bash # Exit on error set -e # Change directory to the Next.js project echo "๐Ÿš€ Building Next.js application..." cd ../doormile-next npm install npm run build # Go back to the build directory echo "๐Ÿงน Preparing build context..." cd ../doormile-build rm -rf build # Copy the static export into the build folder echo "๐Ÿ“ฆ Copying static export..." cp -R ../doormile-next/out ./build # Run the docker build echo "๐Ÿณ Building Docker image..." docker build -t doormile-app . echo "โœ… Docker build completed successfully!"