recipe_planning/Dockerfile
2025-03-23 17:12:04 -07:00

29 lines
474 B
Docker

FROM golang:1.24.1-alpine3.21 AS gobuilder
RUN apk add --no-cache gcc musl-dev
WORKDIR /opt/sorrel
COPY backend/go.mod backend/go.sum ./
RUN go mod download
COPY backend/ .
ENV CGO_ENABLED=1
RUN go build
FROM node:23.10.0-alpine3.21
WORKDIR /opt/sorrel/
ADD src/ src/
ADD static/ static/
COPY package.json svelte.config.js tsconfig.json vite.config.ts yarn.lock ./
RUN yarn install
RUN yarn run build
COPY --from=gobuilder /opt/sorrel/backend .
CMD ["./backend"]