mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-09-05 15:12:16 +08:00
refactor(build): inline compose build logic
This commit is contained in:
parent
7d7e719182
commit
43287c565d
@ -24,19 +24,13 @@ fi
|
||||
cd "$BASE_DIR/.." || exit 1
|
||||
|
||||
split_values() {
|
||||
printf '%s\n' "$1" | tr ', ' '\n\n' | while IFS= read -r value; do
|
||||
[[ -n "$value" ]] && printf '%s\n' "$value"
|
||||
done
|
||||
}
|
||||
|
||||
print_command() {
|
||||
printf '%q ' "$@"
|
||||
printf '\n'
|
||||
echo "$1" | grep -o '[^, ]\+'
|
||||
}
|
||||
|
||||
run_or_print() {
|
||||
if [[ "$DRY_RUN" == "true" ]]; then
|
||||
print_command "$@"
|
||||
printf '%q ' "$@"
|
||||
printf '\n'
|
||||
else
|
||||
"$@"
|
||||
fi
|
||||
@ -44,7 +38,9 @@ run_or_print() {
|
||||
|
||||
build_local() {
|
||||
echo -e "${CYAN}Building all services...${NO_COLOR}"
|
||||
RELEASE="$RELEASE" docker compose --parallel 1 -f "$COMPOSE_FILE" build
|
||||
while IFS= read -r service; do
|
||||
RELEASE="$RELEASE" docker compose -f "$COMPOSE_FILE" build "$service"
|
||||
done < <(docker compose -f "$COMPOSE_FILE" config --services)
|
||||
|
||||
echo -e "${CYAN}Tagging compatibility images for Kubernetes...${NO_COLOR}"
|
||||
while IFS= read -r built_image; do
|
||||
|
||||
@ -1,72 +0,0 @@
|
||||
services:
|
||||
openim-api:
|
||||
build:
|
||||
platforms:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
|
||||
openim-crontask:
|
||||
build:
|
||||
platforms:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
|
||||
openim-msggateway:
|
||||
build:
|
||||
platforms:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
|
||||
openim-msgtransfer:
|
||||
build:
|
||||
platforms:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
|
||||
openim-push:
|
||||
build:
|
||||
platforms:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
|
||||
openim-rpc-auth:
|
||||
build:
|
||||
platforms:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
|
||||
openim-rpc-conversation:
|
||||
build:
|
||||
platforms:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
|
||||
openim-rpc-friend:
|
||||
build:
|
||||
platforms:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
|
||||
openim-rpc-group:
|
||||
build:
|
||||
platforms:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
|
||||
openim-rpc-msg:
|
||||
build:
|
||||
platforms:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
|
||||
openim-rpc-third:
|
||||
build:
|
||||
platforms:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
|
||||
openim-rpc-user:
|
||||
build:
|
||||
platforms:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
Loading…
x
Reference in New Issue
Block a user