dev cicd + tron + docs

This commit is contained in:
Stephan D
2026-01-30 16:58:02 +01:00
parent 51f5b0804a
commit c1596296d1
52 changed files with 3695 additions and 0 deletions

39
ci/dev/ledger.dockerfile Normal file
View File

@@ -0,0 +1,39 @@
# Development Dockerfile for Ledger Service with Air hot reload
FROM golang:alpine AS builder
# Install build dependencies
RUN apk add --no-cache bash git build-base protoc protobuf-dev && \
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest && \
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest && \
go install github.com/air-verse/air@latest
WORKDIR /src
# Copy proto and pkg first (changes less frequently)
COPY api/proto ./api/proto
COPY api/pkg ./api/pkg
COPY ci/scripts/proto/generate.sh ./ci/scripts/proto/
# Generate protos (cached if proto files unchanged)
RUN bash ci/scripts/proto/generate.sh
# Runtime stage for development with Air
FROM golang:alpine
RUN apk add --no-cache bash git build-base && \
go install github.com/air-verse/air@latest
WORKDIR /src
# Copy generated proto and pkg from builder
COPY --from=builder /src/api/proto ./api/proto
COPY --from=builder /src/api/pkg ./api/pkg
# Source code will be mounted at runtime to /src/api/ledger
WORKDIR /src/api/ledger
EXPOSE 50052 9401
# Use Air for hot reload
CMD ["air", "-c", ".air.toml", "--", "-config.file", "/app/config.yml", "-debug"]