blob: 7b3b822b83e20d3ab93b40d77a25eee567d7de92 (
plain)
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
|
# stage 1: build frontend
FROM node:24-alpine AS frontend
WORKDIR /app/frontend
COPY frontend/package.json frontend/bun.lockb* ./
RUN npm install -g bun && bun install
COPY frontend/ ./
RUN bun run build
# stage 2: build backend
FROM golang:1.26-alpine AS backend
WORKDIR /app
COPY go.mod go.sum main.go ./
COPY auth/ ./auth/
COPY fetchers/ ./fetchers/
COPY general/ ./general/
COPY notes/ ./notes/
COPY --from=frontend /app/frontend/dist ./frontend/dist
RUN go mod download
RUN go build -o llostre .
# stage 3: runtime
FROM alpine:latest
RUN apk add --no-cache ca-certificates
WORKDIR /app
COPY --from=backend /app/llostre .
EXPOSE 8080
CMD ["./llostre"]
|