Update for component update easier

This commit is contained in:
timqiu 2025-04-07 11:56:11 +08:00
parent 12b1bddf02
commit 1e4aef9dda

View File

@ -1,6 +1,9 @@
#!/usr/bin/env bash
# Modifying it manually is not recommended
# All components that can be started in the DevBox container. [COMPONENT_SETTINGS]
DEVBOX_COMPONENTS=("devsvc" "notification" "content" "central_storage" "chat" "authentication")
log_info() {
echo "[INFO] $(date '+%Y-%m-%d %H:%M:%S') $*"
}
@ -612,28 +615,12 @@ build_local_image() {
fi
}
# Define the local components and their corresponding ports
local_components_ports_keys=("devsvc" "notification" "content" "central_storage" "chat" "authentication")
local_components_ports_values=("8007" "8003" "8013" "8005" "8012" "8004")
# used for repository username and password encoding
url_encode() {
echo "$1" | sed 's/@/%40/g'
}
# Get the port number for a local component
get_port() {
local comp="$1"
local port=""
for i in "${!local_components_ports_keys[@]}"; do
if [ "${local_components_ports_keys[i]}" = "$comp" ]; then
port="${local_components_ports_values[i]}"
break
fi
done
}
###############################################
@ -641,6 +628,7 @@ get_port() {
###############################################
init_compile_env() {
# Update for export environments []
docker exec -i "$DEVBOX_NAME" bash <<EOF
echo "[INIT] \$(date '+%Y-%m-%d %H:%M:%S') Starting DevBox initialization..."
@ -689,8 +677,6 @@ EOFinner
echo "[INIT] \$(date '+%Y-%m-%d %H:%M:%S') Update VITE_PROXY_WEBSOCKET_CHAT_URL and VITE_PROXY_API_CHAT_URL in frontend/.env.development"
sed -i "s|VITE_PROXY_WEBSOCKET_CHAT_URL=.*|VITE_PROXY_WEBSOCKET_CHAT_URL=ws://chat:8012|g" /home/devbox/freeleaps/frontend/freeleaps/.env.development
sed -i "s|VITE_PROXY_API_CHAT_URL=.*|VITE_PROXY_API_CHAT_URL=http://chat:8012|g" /home/devbox/freeleaps/frontend/freeleaps/.env.development
git update-index --skip-worktree /home/devbox/freeleaps/frontend/freeleaps/.env.development
else
# Online component environment variables
echo "[INIT] \$(date '+%Y-%m-%d %H:%M:%S') Use online component dev environment."
@ -724,8 +710,6 @@ EOFinner
echo "[INIT] \$(date '+%Y-%m-%d %H:%M:%S') Update VITE_PROXY_WEBSOCKET_CHAT_URL and VITE_PROXY_API_CHAT_URL in frontend/.env.development"
sed -i "s|VITE_PROXY_WEBSOCKET_CHAT_URL=.*|VITE_PROXY_WEBSOCKET_CHAT_URL=wss://freeleaps-alpha.com|g" /home/devbox/freeleaps/frontend/freeleaps/.env.development
sed -i "s|VITE_PROXY_API_CHAT_URL=.*|VITE_PROXY_API_CHAT_URL=https://freeleaps-alpha.com|g" /home/devbox/freeleaps/frontend/freeleaps/.env.development
git update-index --skip-worktree /home/devbox/freeleaps/frontend/freeleaps/.env.development
echo "[INIT] \$(date '+%Y-%m-%d %H:%M:%S') Online component dev environment variables set."
fi
@ -738,6 +722,8 @@ if true ; then
git update-index --skip-worktree /home/devbox/freeleaps/frontend/freeleaps/.env.development
popd > /dev/null
# Load the environment variables
source /home/devbox/freeleaps/apps/.env
@ -1203,15 +1189,16 @@ docker exec -i "$DEVBOX_NAME" bash <<EOF
echo "[FRONTEND] \$(date '+%Y-%m-%d %H:%M:%S') Use local component dev environment."
sed -i 's#VITE_PROXY_WEBSOCKET_CHAT_URL=ws://localhost:8012#VITE_PROXY_WEBSOCKET_CHAT_URL=ws://chat:8012#g' /home/devbox/freeleaps/frontend/freeleaps/.env.development
sed -i 's#VITE_PROXY_API_CHAT_URL=http://localhost:8012#VITE_PROXY_API_CHAT_URL=http://chat:8012#g' /home/devbox/freeleaps/frontend/freeleaps/.env.development
git update-index --skip-worktree /home/devbox/freeleaps/frontend/freeleaps/.env.development
else
echo "[FRONTEND] \$(date '+%Y-%m-%d %H:%M:%S') Use online component dev environment."
sed -i 's#VITE_PROXY_WEBSOCKET_CHAT_URL=wss://localhost:8012#VITE_PROXY_WEBSOCKET_CHAT_URL=wss://freeleaps-alpha.com#g' /home/devbox/freeleaps/frontend/freeleaps/.env.development
sed -i 's#VITE_PROXY_API_CHAT_URL=http://localhost:8012#VITE_PROXY_API_CHAT_URL=https://freeleaps-alpha.com#g' /home/devbox/freeleaps/frontend/freeleaps/.env.development
git update-index --skip-worktree /home/devbox/freeleaps/frontend/freeleaps/.env.development
fi
pushd /home/devbox/freeleaps > /dev/null
git update-index --skip-worktree /home/devbox/freeleaps/frontend/freeleaps/.env.development
popd > /dev/null
if [[ ! -d "node_modules" || "package.json" -nt "node_modules" || \$time_diff -gt \$threshold ]]; then
echo "[FRONTEND] \$(date '+%Y-%m-%d %H:%M:%S') Installing/Updating frontend dependencies..."
@ -1481,7 +1468,8 @@ devbox_init_command() {
local FORCE_INIT="$(get_arg '--force')"
local is_pull_all_components=true
local components=("devsvc" "notification" "content" "central_storage" "chat" "authentication")
# set local components to content of DEVBOX_COMPONENTS
local components=("${DEVBOX_COMPONENTS[@]}")
local start_components=()
# Check if using local components
@ -1656,7 +1644,10 @@ devbox_init_command() {
# Check if any component is running on the host when force init is not set
if [ -z "$FORCE_INIT" ]; then
running_containers=$(docker ps --format '{{.Names}}')
components_to_check=("devbox" "freeleaps2-gitea" "freeleaps2-mongodb" "freeleaps2-rabbitmq" "freeleaps2-redis" "devsvc" "notification" "content" "central_storage" "chat" "authentication")
# Check if any component is running on the host
components_to_check=("devbox" "freeleaps2-gitea" "freeleaps2-mongodb" "freeleaps2-rabbitmq" "freeleaps2-redis")
components_to_check+=("${DEVBOX_COMPONENTS[@]}")
for comp in "${components_to_check[@]}"; do
if echo "$running_containers" | grep -qx "$comp"; then
echo
@ -2218,6 +2209,16 @@ devbox_deinit_command() {
fi
fi
# Check if devbox container is running
if [[ -n "$(docker ps -a --format '{{.Names}}' | grep "^devbox\$")" ]]; then
# Get the container ID of the DevBox container
log_info "DevBox container is stopped."
local container_id
container_id=$(docker ps -a --format '{{.Names}}' | grep "^devbox\$")
exit_with_message " Failed to stop and remove DevBox container when deinitializing. Please try deinit again or manually stop and remove the container." 1
fi
if [[ -f "$WORKING_HOME/.gitea-instance" ]]; then
local gitea_container_id
gitea_container_id=$(cat "$WORKING_HOME/.gitea-instance")
@ -2324,7 +2325,7 @@ devbox_deinit_command() {
fi
# Stop and remove other components
local components=("devsvc" "notification" "content" "central_storage" "chat" "authentication")
local components=("${DEVBOX_COMPONENTS[@]}")
for component in "${components[@]}"; do
if [[ -f "$WORKING_HOME/.${component}-instance" ]]; then
local component_container_id
@ -2475,16 +2476,26 @@ devbox_start_command() {
if [[ "$USE_LOCAL_COMPONENT" == "true" ]]; then
# If no component is specified, start all components
if [[ -z "$COMPONENT" ]]; then
COMPONENTS=( "gitea" "mongodb" "rabbitmq" "devbox" "devsvc" "notification" "content" "central_storage" "chat" "authentication")
COMPONENTS=("mongodb" "rabbitmq" "gitea" "redis" "devbox")
COMPONENTS+=("${DEVBOX_COMPONENTS[@]}")
else
COMPONENTS=("$COMPONENT")
fi
else
# If no component is specified, start all components
if [[ -z "$COMPONENT" ]]; then
COMPONENTS=("mongodb" "rabbitmq" "devbox")
COMPONENTS=("mongodb" "rabbitmq" "gitea" "redis" "devbox")
else
if [[ "$COMPONENT" == "devsvc" || "$COMPONENT" == "notification" || "$COMPONENT" == "content" || "$COMPONENT" == "central_storage" || "$COMPONENT" == "chat" || "$COMPONENT" == "authentication" ]]; then
# Check if the component is a local component from DEVBOX_COMPONENT
found=false
for item in "${DEVBOX_COMPONENTS[@]}"; do
if [ "$item" = "$COMPONENT" ]; then
found=true
break
fi
done
if [ "$found" = true ]; then
exit_with_message "Remote component $COMPONENT cannot be restarted, please use local components." 1
fi
@ -2492,37 +2503,54 @@ devbox_start_command() {
fi
fi
# Start the specified components
BASIC_COMPONENTS=("mongodb" "rabbitmq" "gitea" "redis" "devbox")
for comp in "${COMPONENTS[@]}"; do
case "$comp" in
"gitea" | "mongodb" | "rabbitmq" | "devbox" | "devsvc" | "notification" | "content" | "central_storage" | "chat" | "authentication")
log_info "Starting $comp service..."
# Check if the component container file exists
local component_container_id_file_path="${WORKING_HOME}/.${comp}-instance"
if [[ ! -f "$component_container_id_file_path" ]]; then
log_error "$comp container is not running. Please run 'devbox init' first."
else
local component_container_id=$(cat "$component_container_id_file_path")
if ! docker ps --no-trunc --format '{{.ID}}' | grep -q "^${component_container_id}\$"; then
log_info "$comp container is not running, starting container..."
# Start the container
if ! docker start "${component_container_id}"; then
log_error "Failed to start $comp container."
else
log_info "$comp container started successfully."
fi
else
log_info "$comp container is already running."
fi
should_start=false
# Check if it's in BASIC_COMPONENTS
for basic in "${BASIC_COMPONENTS[@]}"; do
if [ "$comp" = "$basic" ]; then
should_start=true
break
fi
done
# Check if it's in DEVBOX_COMPONENTS
if [ "$should_start" = false ]; then
for dev in "${DEVBOX_COMPONENTS[@]}"; do
if [ "$comp" = "$dev" ]; then
should_start=true
break
fi
;;
*)
exit_with_message " Unknown component: $comp, please check the component name." 1
;;
esac
done
fi
if [ "$should_start" = true ]; then
log_info "Starting $comp service..."
local component_container_id_file_path="${WORKING_HOME}/.${comp}-instance"
if [ ! -f "$component_container_id_file_path" ]; then
log_error "$comp container is not running. Please run 'devbox init' first."
else
local component_container_id=$(cat "$component_container_id_file_path")
if ! docker ps --no-trunc --format '{{.ID}}' | grep -q "^${component_container_id}\$"; then
log_info "$comp container is not running, starting container..."
if ! docker start "${component_container_id}"; then
log_error "Failed to start $comp container."
else
log_info "$comp container started successfully."
fi
else
log_info "$comp container is already running."
fi
fi
else
exit_with_message " Unknown component: $comp, please check the component name." 1
fi
done
# Check if $FREELEAPS_ENDPOINT is not empty and start the frontend and backend services
if [[ "$FREELEAPS_ENDPOINT" != "" ]]; then
# Sleep for 10 seconds to allow the services to start and echo 10 seconds increase from 1 to 10 in each second
@ -2642,51 +2670,70 @@ devbox_stop_command() {
# If the DevBox container is not running, exit
if [[ -z "$COMPONENT" ]]; then
COMPONENTS=("gitea" "mongodb" "rabbitmq" "devbox" "devsvc" "notification" "content" "central_storage" "chat" "authentication")
COMPONENTS=("mongodb" "rabbitmq" "gitea" "redis" "devbox")
COMPONENTS+=("${DEVBOX_COMPONENTS[@]}")
else
COMPONENTS=("$COMPONENT")
fi
# Stop the specified components
BASIC_COMPONENTS=("mongodb" "rabbitmq" "gitea" "redis")
for comp in "${COMPONENTS[@]}"; do
case "$comp" in
"devbox")
if [[ -f "${WORKING_HOME}/.devbox-instance" ]]; then
local container_id
container_id=$(cat "${WORKING_HOME}/.devbox-instance")
if docker ps --no-trunc --format '{{.ID}}' | grep -q "^${container_id}\$"; then
log_info "Stopping devbox..."
docker stop "$container_id" &>/dev/null || true
# Remove the frontend and backend pid files
rm -f "${WORKING_HOME}/.backend.pid"
rm -f "${WORKING_HOME}/.frontend.pid"
else
log_info "DevBox container is not running."
fi
if [ "$comp" = "devbox" ]; then
if [ -f "${WORKING_HOME}/.devbox-instance" ]; then
local container_id
container_id=$(cat "${WORKING_HOME}/.devbox-instance")
if docker ps --no-trunc --format '{{.ID}}' | grep -q "^${container_id}\$"; then
log_info "Stopping devbox..."
docker stop "$container_id" &>/dev/null || true
rm -f "${WORKING_HOME}/.backend.pid"
rm -f "${WORKING_HOME}/.frontend.pid"
else
log_info "Backend service is not running."
log_info "DevBox container is not running."
fi
;;
"gitea"| "mongodb"| "rabbitmq" | "devsvc" | "notification" | "content" | "central_storage" | "chat" | "authentication")
if [[ -f "${WORKING_HOME}/.${comp}-instance" ]]; then
local container_id
container_id=$(cat "${WORKING_HOME}/.${comp}-instance")
if docker ps --no-trunc --format '{{.ID}}' | grep -q "^${container_id}\$"; then
log_info "Stopping $comp service..."
docker stop "$container_id" &>/dev/null || true
else
log_info "$comp service is not running."
fi
else
log_info "Backend service is not running."
fi
continue
fi
should_stop=false
for basic in "${BASIC_COMPONENTS[@]}"; do
if [ "$comp" = "$basic" ]; then
should_stop=true
break
fi
done
if [ "$should_stop" = false ]; then
for dev in "${DEVBOX_COMPONENTS[@]}"; do
if [ "$comp" = "$dev" ]; then
should_stop=true
break
fi
done
fi
if [ "$should_stop" = true ]; then
if [ -f "${WORKING_HOME}/.${comp}-instance" ]; then
local container_id
container_id=$(cat "${WORKING_HOME}/.${comp}-instance")
if docker ps --no-trunc --format '{{.ID}}' | grep -q "^${container_id}\$"; then
log_info "Stopping $comp service..."
docker stop "$container_id" &>/dev/null || true
else
log_info "$comp service is not running."
fi
;;
*)
exit_with_message " Unknown component: $comp, please check the component name." 1
;;
esac
else
log_info "$comp service is not running."
fi
else
exit_with_message " Unknown component: $comp, please check the component name." 1
fi
done
exit_with_message "Stopped Freeleaps services successfully. " 0
@ -2713,79 +2760,46 @@ devbox_status_command() {
# If no component is specified, check all components
if [[ -z "$COMPONENT" ]]; then
COMPONENTS=("mongodb" "rabbitmq" "devbox" "devsvc" "notification" "content" "central_storage" "chat" "authentication")
COMPONENTS=("mongodb" "rabbitmq" "gitea" "redis" "devbox")
COMPONENTS+=("${DEVBOX_COMPONENTS[@]}")
else
COMPONENTS=("$COMPONENT")
fi
# Check the status of the specified components
BASIC_COMPONENTS=("mongodb" "rabbitmq" "gitea" "redis")
ALL_COMPONENTS=("${BASIC_COMPONENTS[@]}" "${DEVBOX_COMPONENTS[@]}" "devbox")
for comp in "${COMPONENTS[@]}"; do
case "$comp" in
"mongodb")
log_info "Checking MongoDB status..."
if [[ -f "${WORKING_HOME}/.mongodb-instance" ]]; then
local container_id
container_id=$(cat "${WORKING_HOME}/.mongodb-instance")
if docker ps --no-trunc --format '{{.ID}}' | grep -q "^${container_id}\$"; then
log_info "[RESULT]: MongoDB container is running."
else
log_info "[RESULT]: MongoDB container is not running."
fi
else
log_info "[RESULT]: MongoDB container is not running."
fi
;;
"rabbitmq")
log_info "Checking RabbitMQ status..."
if [[ -f "${WORKING_HOME}/.rabbitmq-instance" ]]; then
local container_id
container_id=$(cat "${WORKING_HOME}/.rabbitmq-instance")
if docker ps --no-trunc --format '{{.ID}}' | grep -q "^${container_id}\$"; then
log_info "[RESULT]: RabbitMQ container is running."
else
log_info "[RESULT]: RabbitMQ container is not running."
fi
else
log_info "[RESULT]: RabbitMQ container is not running."
fi
;;
"devbox")
log_info "Checking devbox service status..."
if [[ -f "${WORKING_HOME}/.devbox-instance" ]]; then
local container_id
container_id=$(cat "${WORKING_HOME}/.devbox-instance")
if docker ps --no-trunc --format '{{.ID}}' | grep -q "^${container_id}\$"; then
log_info "[RESULT]: devbox container is running."
else
log_info "[RESULT]: devbox container is not running."
fi
else
log_info "[RESULT]: devbox container is not running."
fi
;;
"devsvc" | "notification" | "content" | "central_storage" | "chat" | "authentication")
log_info "Checking $comp service status..."
if [[ -f "${WORKING_HOME}/.${comp}-instance" ]]; then
local container_id
container_id=$(cat "${WORKING_HOME}/.${comp}-instance")
if docker ps --no-trunc --format '{{.ID}}' | grep -q "^${container_id}\$"; then
log_info "[RESULT]: $comp service is running."
case_checked=false
# devsvc, notification, content...
if [ "$case_checked" = false ]; then
for svc in "${ALL_COMPONENTS[@]}"; do
if [ "$comp" = "$svc" ]; then
log_info "Checking $comp service status..."
if [ -f "${WORKING_HOME}/.${comp}-instance" ]; then
local container_id
container_id=$(cat "${WORKING_HOME}/.${comp}-instance")
if docker ps --no-trunc --format '{{.ID}}' | grep -q "^${container_id}\$"; then
log_info "[RESULT]: $comp service is running."
else
log_info "[RESULT]: $comp service is not running."
fi
else
log_info "[RESULT]: $comp service is not running."
fi
else
log_info "[RESULT]: $comp service is not running."
case_checked=true
break
fi
;;
*)
exit_with_message " Unknown component: $comp, please check the component name." 1
;;
esac
done
fi
# unknown
if [ "$case_checked" = false ]; then
exit_with_message " Unknown component: $comp, please check the component name." 1
fi
done
exit_with_message " DevBox services status checked successfully." 0
}
@ -2859,77 +2873,100 @@ devbox_restart_command() {
if [[ "$USE_LOCAL_COMPONENT" == "true" ]]; then
log_info "Using local components..."
if [[ -z "$COMPONENT" ]]; then
COMPONENTS=("gitea" "mongodb" "rabbitmq" "devbox" "devsvc" "notification" "content" "central_storage" "chat" "authentication")
COMPONENTS=("mongodb" "rabbitmq" "gitea" "redis" "devbox")
COMPONENTS+=("${DEVBOX_COMPONENTS[@]}")
else
COMPONENTS=("$COMPONENT")
fi
else
log_info "Using remote components..."
if [[ -z "$COMPONENT" ]]; then
COMPONENTS=("mongodb" "rabbitmq" "devbox")
COMPONENTS=("mongodb" "rabbitmq" "gitea" "redis" "devbox")
else
if [[ "$COMPONENT" == "devsvc" || "$COMPONENT" == "notification" || "$COMPONENT" == "content" || "$COMPONENT" == "central_storage" || "$COMPONENT" == "chat" || "$COMPONENT" == "authentication" ]]; then
exit_with_message " Remote component $COMPONENT cannot be restarted, please use local components." 1
found=false
for item in "${DEVBOX_COMPONENTS[@]}"; do
if [ "$item" = "$COMPONENT" ]; then
found=true
break
fi
done
if [ "$found" = true ]; then
exit_with_message "Remote component $COMPONENT cannot be restarted, please use local components." 1
fi
COMPONENTS=("$COMPONENT")
fi
fi
# Stop the specified components
BASIC_COMPONENTS=("mongodb" "rabbitmq" "gitea" "redis")
ALL_COMPONENTS=("${BASIC_COMPONENTS[@]}" "${DEVBOX_COMPONENTS[@]}" "devbox")
# Stop the specified components
for comp in "${COMPONENTS[@]}"; do
case "$comp" in
"devbox")
if [[ -f "${WORKING_HOME}/.devbox-instance" ]]; then
local container_id
container_id=$(cat "${WORKING_HOME}/.devbox-instance")
log_info "Stopping devbox service..."
docker stop "$container_id" &>/dev/null || true
# Remove the frontend and backend pid files
rm -f "${WORKING_HOME}/.backend.pid"
rm -f "${WORKING_HOME}/.frontend.pid"
else
log_info "Devbox is not running."
fi
;;
"gitea" | "mongodb" | "rabbitmq" | "devsvc" | "notification" | "content" | "central_storage" | "chat" | "authentication")
if [[ -f "${WORKING_HOME}/.${comp}-instance" ]]; then
local container_id
container_id=$(cat "${WORKING_HOME}/.${comp}-instance")
log_info "Stopping $comp service..."
docker stop "$container_id" &>/dev/null || true
else
log_info "$comp service is not running."
fi
;;
*)
exit_with_message " Unknown component: $comp, please check the component name." 1
;;
esac
if [ "$comp" = "devbox" ]; then
if [ -f "${WORKING_HOME}/.devbox-instance" ]; then
local container_id
container_id=$(cat "${WORKING_HOME}/.devbox-instance")
log_info "Stopping devbox service..."
docker stop "$container_id" &>/dev/null || true
rm -f "${WORKING_HOME}/.backend.pid"
rm -f "${WORKING_HOME}/.frontend.pid"
else
log_info "Devbox is not running."
fi
continue
fi
should_stop=false
for known in "${BASIC_COMPONENTS[@]}" "${DEVBOX_COMPONENTS[@]}"; do
if [ "$comp" = "$known" ]; then
should_stop=true
break
fi
done
if [ "$should_stop" = true ]; then
if [ -f "${WORKING_HOME}/.${comp}-instance" ]; then
local container_id
container_id=$(cat "${WORKING_HOME}/.${comp}-instance")
log_info "Stopping $comp service..."
docker stop "$container_id" &>/dev/null || true
else
log_info "$comp service is not running."
fi
else
exit_with_message " Unknown component: $comp, please check the component name." 1
fi
done
# Start the specified components
# Sleep 5 seconds to allow the services to stop, for each second echo 5 seconds increase from 1 to 5 in each second by -
for comp in "${COMPONENTS[@]}"; do
case "$comp" in
"gitea" | "mongodb" | "rabbitmq" | "devbox" | "devsvc" | "notification" | "content" | "central_storage" | "chat" | "authentication")
log_info "Restarting $comp service..."
if [[ -f "${WORKING_HOME}/.${comp}-instance" ]]; then
local container_id
container_id=$(cat "${WORKING_HOME}/.${comp}-instance")
docker start "$container_id" &>/dev/null || true
else
log_info "$comp service is not running."
fi
;;
*)
exit_with_message " Unknown component: $comp, please check the component name." 1
;;
esac
is_known=false
for known in "${ALL_COMPONENTS[@]}"; do
if [ "$comp" = "$known" ]; then
is_known=true
break
fi
done
if [ "$is_known" = true ]; then
log_info "Restarting $comp service..."
if [ -f "${WORKING_HOME}/.${comp}-instance" ]; then
local container_id
container_id=$(cat "${WORKING_HOME}/.${comp}-instance")
docker start "$container_id" &>/dev/null || true
else
log_info "$comp service is not running."
fi
else
exit_with_message " Unknown component: $comp, please check the component name." 1
fi
done
exit_with_message " DevBox services restarted successfully." 0
}
@ -3308,54 +3345,6 @@ devbox_init_parse_requirements() {
add_arg '--devbox-image-tag' "devbox_local"
fi
if [ -z "$(get_arg '--devsvc-image-tag')" ]; then
if [ "$current_arch" == "arm64" ]; then
add_arg '--devsvc-image-tag' "latest-linux-arm64"
else
add_arg '--devsvc-image-tag' "latest-linux-amd64"
fi
fi
if [ -z "$(get_arg '--content-image-tag')" ]; then
if [ "$current_arch" == "arm64" ]; then
add_arg '--content-image-tag' "latest-linux-arm64"
else
add_arg '--content-image-tag' "latest-linux-amd64"
fi
fi
if [ -z "$(get_arg '--central_storage-image-tag')" ]; then
if [ "$current_arch" == "arm64" ]; then
add_arg '--central_storage-image-tag' "latest-linux-arm64"
else
add_arg '--central_storage-image-tag' "latest-linux-amd64"
fi
fi
if [ -z "$(get_arg '--chat-image-tag')" ]; then
if [ "$current_arch" == "arm64" ]; then
add_arg '--chat-image-tag' "latest-linux-arm64"
else
add_arg '--chat-image-tag' "latest-linux-amd64"
fi
fi
if [ -z "$(get_arg '--notification-image-tag')" ]; then
if [ "$current_arch" == "arm64" ]; then
add_arg '--notification-image-tag' "latest-linux-arm64"
else
add_arg '--notification-image-tag' "latest-linux-amd64"
fi
fi
if [ -z "$(get_arg '--authentication-image-tag')" ]; then
if [ "$current_arch" == "arm64" ]; then
add_arg '--authentication-image-tag' "latest-linux-arm64"
else
add_arg '--authentication-image-tag' "latest-linux-amd64"
fi
fi
if [ -z "$(get_arg '--use-custom-repository')" ]; then
add_arg '--use-custom-repository' ""
fi