aboutsummaryrefslogtreecommitdiffhomepage
path: root/Dockerfile
blob: aecd0c54d3007e39ba0c125b97d9ed374bdbe24e (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
28
29
30
31
32
33
34
FROM node:22-alpine AS frontend-builder

WORKDIR /app

COPY frontend/package.json frontend/package-lock.json ./
RUN npm install

COPY frontend/ ./
COPY common/graphql/schema.graphql src/graphql/schema.graphql
RUN npm run build

##########################################
FROM golang:1.24 AS backend-builder

WORKDIR /app

RUN apt-get update && \
    apt-get install -y libsqlite3-dev

COPY backend/go.mod backend/go.sum ./
RUN go mod download

COPY backend/ ./
COPY --from=frontend-builder /app/dist/ ./public/
RUN CGO_ENABLED=1 GOOS=linux go build -o feedaka .

##########################################
FROM gcr.io/distroless/cc-debian12

WORKDIR /app
COPY --from=backend-builder /app/feedaka /app

EXPOSE 8080
CMD ["/app/feedaka"]