diff --git a/docker-compose.override.yml b/docker-compose.override.yml index 0751abe90..1fffd3aac 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -10,7 +10,7 @@ services: volumes: - /var/run/docker.sock:/var/run/docker.sock ports: - - "80:80" + - "8089:80" - "8090:8080" # Duplicate the command from docker-compose.yml to add --api.insecure=true command: diff --git a/release.sh b/release.sh new file mode 100755 index 000000000..f555f7a3f --- /dev/null +++ b/release.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +set -e + +# === 配置 === +USER=fewinter # 你的 Docker Hub 用户名 +BACKEND_DIR=./backend +FRONTEND_DIR=./frontend +BACKEND_IMAGE=$USER/fastapi-backend +FRONTEND_IMAGE=$USER/fastapi-frontend +TAG=${1:-latest} # 默认 tag 是 latest,传参可覆盖 + +# === 构建并推送 === +echo "▶ Building and pushing backend..." +docker buildx build --platform linux/amd64 -t $BACKEND_IMAGE:$TAG $BACKEND_DIR --push + +echo "▶ Building and pushing frontend..." +docker buildx build --platform linux/amd64 -t $FRONTEND_IMAGE:$TAG $FRONTEND_DIR --push + +echo "✅ Release completed: $TAG"