Files
luos/docker/build.sh

41 lines
968 B
Bash
Raw Normal View History

#!/bin/bash
# Check if the first parameter is provided
if [ -z "$1" ]; then
echo "Error: Semantic version parameter is required."
echo "Usage: $0 <semantic_version>"
exit 1
fi
echo "Building Lurana Open Source version $1"
2025-04-11 09:00:55 +00:00
# Install Node.js 14
2025-04-12 10:55:25 +00:00
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install 14
2025-04-11 09:00:55 +00:00
# Update and install Composer dependencies
composer update
composer install
2025-04-11 09:00:55 +00:00
echo "Building Laravel+Vue "
2025-04-12 10:55:25 +00:00
nvm use 14
2025-04-11 09:00:55 +00:00
node -v
npm install
npm run dev
2025-04-12 10:55:25 +00:00
ls -lhs workflow/public_html/webapp
2025-04-11 09:00:55 +00:00
# Construct the Docker image tag name
2025-04-06 08:21:10 +00:00
tagname="gitlab.luranasoft.com:5050/luos/core/luos:$1"
echo "Docker tag name: $tagname"
# Build the Docker image using the new tag name
docker build -t "$tagname" -f ./docker/Dockerfile .
# Push the Docker image to the repository
docker push "$tagname"
echo "Build and push completed successfully."