diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-06-23 02:39:33 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-06-23 02:45:47 +0900 |
| commit | 6522702f59706c84f419491d4ac8b86cfba2ffe2 (patch) | |
| tree | 53390ccc269138ae6f1c25c878854cfb257da003 /Dockerfile | |
| parent | 3a9a4c43c13e881fd62e70dcb698c392b1ed2b64 (diff) | |
| download | feedaka-6522702f59706c84f419491d4ac8b86cfba2ffe2.tar.gz feedaka-6522702f59706c84f419491d4ac8b86cfba2ffe2.tar.zst feedaka-6522702f59706c84f419491d4ac8b86cfba2ffe2.zip | |
chore: git-ignore pre-built artifact
Diffstat (limited to 'Dockerfile')
| -rw-r--r-- | Dockerfile | 19 |
1 files changed, 17 insertions, 2 deletions
@@ -1,4 +1,16 @@ -FROM golang:1.23-alpine AS builder +FROM node:22-alpine AS frontend-builder + +WORKDIR /app + +COPY package.json package-lock.json ./ +RUN npm install + +COPY . ./ +RUN npm run build + +########################################## + +FROM golang:1.23-alpine AS backend-builder WORKDIR /app @@ -7,12 +19,15 @@ COPY go.mod go.sum ./ RUN go mod download COPY . ./ +COPY --from=frontend-builder /app/static/style.css ./static/style.css RUN CGO_ENABLED=1 GOOS=linux go build -o feedaka main.go +########################################## + FROM alpine WORKDIR /app -COPY --from=builder /app/feedaka /app +COPY --from=backend-builder /app/feedaka /app EXPOSE 8080 CMD ["/app/feedaka"] |
