Files
boc/backend/Dockerfile
T
Bernt bd28b60338 feat: BOC ledger-integration frontend + backend fixes
- Uppdatera robust_client.go med rätt tabellnamn (boc_chart_of_accounts, boc_journal_lines, boc_journal_entries)
- Uppdatera kolumnnamn (entry_id istället för journal_entry_id, account_code istället för code)
- Hantera både stora och små bokstäver för account_type
- Lägg till ledgerApi i frontend med BalanceSheet, IncomeStatement, MomsReport
- Uppdatera DashboardPage med Ledger KPI-kort
- Lägg till LEDGER_DB_URL i docker-compose.yml
- Uppdatera Dockerfile till golang:1.25-alpine
2026-07-29 19:53:39 +00:00

44 lines
777 B
Docker

# BOC Backend Dockerfile
# Multi-stage build for minimal image
FROM golang:1.25-alpine AS builder
WORKDIR /app
# Install dependencies
RUN apk add --no-cache git
# Copy go mod files
COPY go.mod go.sum ./
RUN go mod download
# Copy source
COPY . .
# Build
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o boc .
# Final stage
FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /app
# Copy binary
COPY --from=builder /app/boc .
COPY --from=builder /app/db/migrations ./db/migrations
# Create non-root user
RUN addgroup -g 1000 -S boc && \
adduser -u 1000 -S boc -G boc
USER boc
EXPOSE 9092
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD wget -qO- http://localhost:9092/health || exit 1
CMD ["./boc"]