From 10e54b1bb7979dc21911afce0d20cffc4a2d038a Mon Sep 17 00:00:00 2001 From: Guillermo Serrahima Date: Tue, 2 Jun 2026 03:15:03 +0200 Subject: added images --- Dockerfile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Dockerfile (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ce9b164 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,27 @@ +# stage 1: build frontend +FROM node:22-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.25-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"] -- cgit v1.2.3