diff options
| author | Guillermo Serrahima <dev@vylion.com> | 2026-06-02 03:15:03 +0200 |
|---|---|---|
| committer | Guillermo Serrahima <dev@vylion.com> | 2026-07-14 23:11:05 +0200 |
| commit | 10e54b1bb7979dc21911afce0d20cffc4a2d038a (patch) | |
| tree | a0513d16a7896031efff51db61f04a50b95f719e /Dockerfile | |
| parent | 9f0a9a6779f00786e4728ad5c3fad36814a293b0 (diff) | |
| download | llostre-10e54b1bb7979dc21911afce0d20cffc4a2d038a.tar.xz llostre-10e54b1bb7979dc21911afce0d20cffc4a2d038a.zip | |
added images
Diffstat (limited to 'Dockerfile')
| -rw-r--r-- | Dockerfile | 27 |
1 files changed, 27 insertions, 0 deletions
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"] |
