chore: remove proto codegen from deploy flow
This commit is contained in:
@@ -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.' \
|
|
||||||
"]
|
|
||||||
@@ -1,17 +1,4 @@
|
|||||||
services:
|
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:
|
nginx:
|
||||||
image: nginx:alpine
|
image: nginx:alpine
|
||||||
container_name: yoresee_doc_nginx
|
container_name: yoresee_doc_nginx
|
||||||
|
|||||||
@@ -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
|
|
||||||
}
|
|
||||||
@@ -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
|
|
||||||
@@ -17,12 +17,6 @@ Write-Host "Base path: $BasePath"
|
|||||||
$ComposeFile = if ($Environment -eq 'dev') { 'docker-compose.dev.yml' } else { 'docker-compose.yml' }
|
$ComposeFile = if ($Environment -eq 'dev') { 'docker-compose.dev.yml' } else { 'docker-compose.yml' }
|
||||||
Write-Host "Compose file: $ComposeFile"
|
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
|
Push-Location $DeployDir
|
||||||
try {
|
try {
|
||||||
switch ($Action) {
|
switch ($Action) {
|
||||||
|
|||||||
@@ -46,11 +46,6 @@ fi
|
|||||||
|
|
||||||
echo "Using compose file: $COMPOSE_FILE"
|
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
|
case "$ACTION" in
|
||||||
"rebuild")
|
"rebuild")
|
||||||
echo "Rebuilding and starting services..."
|
echo "Rebuilding and starting services..."
|
||||||
|
|||||||
Reference in New Issue
Block a user