File size: 726 Bytes
fd52f31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
set -e

echo "===> Building PodCraft for deployment <===="

# Navigate to frontend directory
echo "Building frontend..."
cd frontend/podcraft

# Install dependencies
echo "Installing frontend dependencies..."
npm install

# Build the frontend
echo "Creating production build..."
npm run build

# Back to root directory
cd ../../

# Make sure static directory exists
mkdir -p app/static

# Copy build to static directory (this will be mounted by FastAPI)
echo "Copying frontend build to static directory..."
cp -r frontend/podcraft/build/* app/static/

echo "Building Docker image..."
docker build -t podcraft-app .

echo "Build completed successfully!"
echo "You can now run: docker run -p 8000:8000 podcraft-app"