Files
Benjamin Boenisch 414e0f5ec0
All checks were successful
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-school (push) Successful in 28s
CI / test-go-edu-search (push) Successful in 27s
CI / test-python-klausur (push) Successful in 1m45s
CI / test-python-agent-core (push) Successful in 16s
CI / test-nodejs-website (push) Successful in 21s
feat: edu-search-service migriert, voice-service/geo-service entfernt
- edu-search-service von breakpilot-pwa nach breakpilot-lehrer kopiert (ohne vendor)
- opensearch + edu-search-service in docker-compose.yml hinzugefuegt
- voice-service aus docker-compose.yml entfernt (jetzt in breakpilot-core)
- geo-service aus docker-compose.yml entfernt (nicht mehr benoetigt)
- CI/CD: edu-search-service zu Gitea Actions und Woodpecker hinzugefuegt
  (Go lint, test mit go mod download, build, SBOM)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 18:36:38 +01:00

49 lines
977 B
Docker

# Build stage
FROM golang:1.23-alpine AS builder
WORKDIR /app
# Copy go mod files and vendor
COPY go.mod go.sum ./
COPY vendor/ vendor/
# Copy source code
COPY . .
# Build binary with vendor mode
RUN CGO_ENABLED=0 GOOS=linux go build -mod=vendor -a -installsuffix cgo -o edu-search-service ./cmd/server
# Runtime stage
FROM alpine:3.19
WORKDIR /app
# Install CA certificates for HTTPS
RUN apk --no-cache add ca-certificates tzdata
# Create non-root user
RUN adduser -D -g '' appuser
# Copy binary from builder
COPY --from=builder /app/edu-search-service .
# Copy seeds, rules and migrations
COPY seeds/ ./seeds/
COPY rules/ ./rules/
COPY migrations/ ./migrations/
# Set ownership
RUN chown -R appuser:appuser /app
USER appuser
# Expose port
EXPOSE 8086
# Health check
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:8086/v1/health || exit 1
# Run
CMD ["./edu-search-service"]