2026-05-06 12:20:31 -04:00
|
|
|
# Build stage
|
|
|
|
|
FROM golang:1.24-alpine AS builder
|
2026-04-26 17:28:06 +00:00
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
2026-05-06 12:20:31 -04:00
|
|
|
# Copy go mod files first for caching
|
|
|
|
|
COPY go.mod go.sum ./
|
|
|
|
|
RUN go mod download
|
feat(CUB-64): Docker runtime setup for development & deployment
- Backend Dockerfile: added curl install for health check (not in aspnet base image)
- Frontend Dockerfile: multi-stage Angular build with nginx serving
- Frontend nginx.conf: SPA routing, API proxy, SignalR WebSocket support, health endpoint
- Frontend .dockerignore: excludes node_modules, dist, .angular, etc.
- docker-compose.dev.yml: added PostgreSQL service, fixed frontend context path,
renamed web service from control-center-web to extrudex-web, added DB env vars,
proper service dependencies with health checks
- deploy.sh: updated service list to include PostgreSQL port
2026-04-27 08:33:18 +00:00
|
|
|
|
2026-05-06 12:20:31 -04:00
|
|
|
# Copy source and build
|
|
|
|
|
COPY . .
|
|
|
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -o server ./cmd/server
|
2026-04-26 17:28:06 +00:00
|
|
|
|
2026-05-06 12:20:31 -04:00
|
|
|
# Final stage
|
|
|
|
|
FROM alpine:latest
|
|
|
|
|
RUN apk --no-cache add ca-certificates
|
|
|
|
|
|
|
|
|
|
WORKDIR /root/
|
|
|
|
|
|
|
|
|
|
# Copy binary from builder
|
|
|
|
|
COPY --from=builder /app/server .
|
2026-04-26 17:28:06 +00:00
|
|
|
|
|
|
|
|
EXPOSE 8080
|
|
|
|
|
|
2026-05-06 12:20:31 -04:00
|
|
|
CMD ["./server"]
|