-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
47 lines (27 loc) · 948 Bytes
/
Copy pathDockerfile
File metadata and controls
47 lines (27 loc) · 948 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
### ------------------------------------------------------------------------------
FROM node:24-alpine AS frontend-builder
RUN corepack enable
WORKDIR /app
COPY frontend/package.json frontend/pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
COPY frontend/ ./
RUN pnpm build
### ------------------------------------------------------------------------------
FROM golang:1.25-alpine AS backend-builder
RUN apk add --no-cache gcc musl-dev
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY internal/ internal/
COPY cmd/ cmd/
COPY --from=frontend-builder /app/dist ./internal/infra/http/static/dist
RUN CGO_ENABLED=1 GOOS=linux go build ./cmd/server/main.go
### ------------------------------------------------------------------------------
FROM alpine:3.21
RUN apk add --no-cache ca-certificates tzdata
ENV TZ=Europe/London
WORKDIR /app
ENV ENV=production
COPY --from=backend-builder /app .
EXPOSE 9876
CMD ["./main"]