You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
website/Dockerfile

26 lines
650 B
Docker

FROM node:18 AS frontend-builder
WORKDIR /frontend
COPY ./frontend/package.json ./package.json
COPY ./frontend/package-lock.json ./package-lock.json
RUN npm install
COPY ./frontend .
RUN make
FROM golang:1.18-alpine AS backend-builder
WORKDIR /backend
COPY go.mod go.sum ./
RUN go mod download -x
COPY . .
RUN go build -buildvcs=false -o website-server -v .
FROM alpine:latest AS runner
WORKDIR /app
COPY --from=frontend-builder /frontend/dist ./frontend/dist
2 years ago
COPY --from=backend-builder /backend/website-server ./website-server
COPY ./views ./views
COPY ./news ./news
COPY ./public ./public
2 years ago
COPY ./.env ./.env
EXPOSE 8000
CMD ["./website-server"]