-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (24 loc) · 750 Bytes
/
Dockerfile
File metadata and controls
40 lines (24 loc) · 750 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
FROM golang:1.25.3-alpine AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
ARG TARGETARCH
RUN CGO_ENABLED=0 GOOS=linux GOARCH=$TARGETARCH go build -o bridge main.go
FROM node:20-alpine AS plans-builder
WORKDIR /app
COPY static/plans/package.json static/plans/package-lock.json ./static/plans/
RUN cd static/plans && npm ci
COPY static/plans/ ./static/plans/
RUN cd static/plans && npm run build
FROM alpine:latest
RUN apk add --no-cache bash postgresql-client
WORKDIR /app
COPY --from=builder /app/bridge /bin/bridge
COPY --from=builder /app/ddl ./ddl
COPY --from=plans-builder /app/static/plans/dist ./static/plans/dist
EXPOSE 1323
ARG GIT_SHA
ENV GIT_SHA=$GIT_SHA
ENV GODEBUG=http2client=0
CMD ["bridge"]