chore: remove proto codegen from deploy flow

This commit is contained in:
2026-08-17 14:13:50 +08:00
parent eb25aa19d9
commit 5bd743268c
6 changed files with 0 additions and 73 deletions
-11
View File
@@ -1,11 +0,0 @@
FROM bufbuild/buf:latest
WORKDIR /workspace/proto
ENTRYPOINT ["sh", "-c", "\
buf generate --template buf.gen.backend.yaml && \
buf generate --template buf.gen.collab-go.yaml && \
buf generate --template buf.gen.frontend.yaml && \
buf generate --template buf.gen.node.yaml && \
echo 'Proto generation complete.' \
"]
-13
View File
@@ -1,17 +1,4 @@
services:
proto-gen:
build:
context: ../proto
dockerfile: ../deploy/Dockerfile.proto-gen
image: yoresee_doc_proto_gen:latest
container_name: yoresee_doc_proto_gen
volumes:
- ../proto:/workspace/proto
- ../backend/pkg/gen:/workspace/backend/pkg/gen
- ../collab-go/pkg/gen:/workspace/collab-go/pkg/gen
- ../frontend/src/gen:/workspace/frontend/src/gen
- ../collab/src/gen:/workspace/collab/src/gen
nginx:
image: nginx:alpine
container_name: yoresee_doc_nginx
-20
View File
@@ -1,20 +0,0 @@
#Requires -Version 5.1
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Definition
$DeployDir = Resolve-Path "$ScriptDir\.."
if (Get-Command buf -ErrorAction SilentlyContinue) {
Write-Host "buf found locally, generating directly..."
Push-Location "$DeployDir\..\proto"
buf generate --template buf.gen.backend.yaml
buf generate --template buf.gen.collab-go.yaml
buf generate --template buf.gen.frontend.yaml
buf generate --template buf.gen.node.yaml
Pop-Location
Write-Host "Proto generation complete."
} else {
Write-Host "buf not found locally, using proto-gen container..."
docker compose -f "$DeployDir\docker-compose.dev.yml" run --rm proto-gen
}
-18
View File
@@ -1,18 +0,0 @@
#!/bin/bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
DEPLOY_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
if command -v buf &>/dev/null; then
echo "buf found locally, generating directly..."
cd "$DEPLOY_DIR/../proto"
buf generate --template buf.gen.backend.yaml
buf generate --template buf.gen.collab-go.yaml
buf generate --template buf.gen.frontend.yaml
buf generate --template buf.gen.node.yaml
echo "Proto generation complete."
else
echo "buf not found locally, using proto-gen container..."
docker compose -f "$DEPLOY_DIR/docker-compose.dev.yml" run --rm proto-gen
fi
-6
View File
@@ -17,12 +17,6 @@ Write-Host "Base path: $BasePath"
$ComposeFile = if ($Environment -eq 'dev') { 'docker-compose.dev.yml' } else { 'docker-compose.yml' }
Write-Host "Compose file: $ComposeFile"
if ($Environment -eq 'dev') {
Write-Host "Generating proto code..."
docker compose -f "$DeployDir\$ComposeFile" run --rm proto-gen
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
}
Push-Location $DeployDir
try {
switch ($Action) {
-5
View File
@@ -46,11 +46,6 @@ fi
echo "Using compose file: $COMPOSE_FILE"
if [ "$ENVIRONMENT" = "dev" ]; then
echo "Generating proto code..."
docker compose -f "$COMPOSE_FILE" run --rm proto-gen
fi
case "$ACTION" in
"rebuild")
echo "Rebuilding and starting services..."