mirror of
https://github.com/mediacms-io/mediacms.git
synced 2025-11-10 01:18:55 -05:00
feat: Improves the build and deploy functionality (build video_editor and video_js at once)
This commit is contained in:
parent
388a2bec91
commit
e2a469880d
@ -1,5 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# This script builds the video editor package and deploys the frontend assets to the static directory.
|
# This script builds the video editor package and deploys the frontend assets to the static directory.
|
||||||
|
# How to run: sh deploy/scripts/build_and_deploy.sh
|
||||||
|
|
||||||
# Exit on any error
|
# Exit on any error
|
||||||
set -e
|
set -e
|
||||||
@ -12,9 +13,15 @@ cd frontend-tools/video-editor
|
|||||||
yarn build:django
|
yarn build:django
|
||||||
cd ../../
|
cd ../../
|
||||||
|
|
||||||
|
# Build video js package
|
||||||
|
echo "Building video js package..."
|
||||||
|
cd frontend-tools/video-js
|
||||||
|
yarn build:django
|
||||||
|
cd ../../
|
||||||
|
|
||||||
# Run npm build in the frontend container
|
# Run npm build in the frontend container
|
||||||
echo "Building frontend assets..."
|
echo "Building frontend assets..."
|
||||||
docker compose -f docker-compose-dev.yaml exec frontend npm run dist
|
docker compose -f docker-compose/docker-compose-dev-updated.yaml exec frontend npm run dist
|
||||||
|
|
||||||
# Copy static assets to the static directory
|
# Copy static assets to the static directory
|
||||||
echo "Copying static assets..."
|
echo "Copying static assets..."
|
||||||
@ -22,6 +29,6 @@ cp -r frontend/dist/static/* static/
|
|||||||
|
|
||||||
# Restart the web service
|
# Restart the web service
|
||||||
echo "Restarting web service..."
|
echo "Restarting web service..."
|
||||||
docker compose -f docker-compose-dev.yaml restart web
|
docker compose -f docker-compose/docker-compose-dev-updated.yaml restart web
|
||||||
|
|
||||||
echo "Build and deployment completed successfully!"
|
echo "Build and deployment completed successfully!"
|
||||||
Loading…
x
Reference in New Issue
Block a user