Files
mediacms/deploy/scripts/build_and_deploy.sh
T

27 lines
734 B
Bash
Raw Normal View History

2025-05-15 10:43:26 +03:00
#!/bin/bash
2025-05-23 11:32:38 +03:00
# This script builds the video editor package and deploys the frontend assets to the static directory.
2025-05-15 10:43:26 +03:00
# Exit on any error
set -e
echo "Starting build process..."
# Build video editor package
echo "Building video editor package..."
cd frontend-tools/video-editor
yarn build:django
cd ../../
# Run npm build in the frontend container
echo "Building frontend assets..."
2025-05-23 11:32:38 +03:00
docker compose -f docker-compose-dev.yaml exec frontend npm run dist
2025-05-15 10:43:26 +03:00
# Copy static assets to the static directory
echo "Copying static assets..."
cp -r frontend/dist/static/* static/
# Restart the web service
echo "Restarting web service..."
2025-05-23 11:32:38 +03:00
docker compose -f docker-compose-dev.yaml restart web
2025-05-15 10:43:26 +03:00
echo "Build and deployment completed successfully!"