#!/bin/bash # @Contact : liuyuqi.gov@msn.cn # @Time : 2024/03/19 17:10:56 # @License : (C)Copyright 2022 liuyuqi. # @Desc : ############################################################################### set -e sex -x docker compose -f "docker-compose.debug.yml" up -d --build cd backend pip isntall poetry poetry install poetry shell python main.py function docker_compose_build() { docker compose build -f docker-compose.debug.yml docker compse down -v --remove-orphans docker compose up -d docker compose exec -T backend bash /app/tests-start.sh "$@" docker compose down -v --remove-orphans TAG= ${TAG?Variable not set} \ FRONTEND_ENV=${FRONTEND_ENV-production} \ sh ./scripts/build.sh docker compose -f docker-compose.debug.yml push } function deploy() { DOMAIN=${DOMAIN?Variable not set} \ STACK_NAME=${STACK_NAME?Variable not set} \ TAG=${TAG?Variable not set} \ docker-compose \ -f docker-compose.yml \ config > docker-stack.yml docker-auto-labels docker-stack.yml docker stack deploy -c docker-stack.yml --with-registry-auth "${STACK_NAME?Variable not set}" }