22 lines
321 B
Docker
22 lines
321 B
Docker
|
FROM golang:1.19 as go
|
||
|
|
||
|
COPY ./api /api
|
||
|
WORKDIR /api
|
||
|
RUN go build -o /api/main /api/*.go
|
||
|
|
||
|
FROM node as node
|
||
|
|
||
|
COPY ./app /app
|
||
|
WORKDIR /app
|
||
|
ENV NODE_ENV=production
|
||
|
RUN npm install
|
||
|
RUN npm install && npm run build
|
||
|
|
||
|
FROM debian
|
||
|
|
||
|
COPY --from=go /api/main /main
|
||
|
COPY --from=node /app/www /api/www
|
||
|
|
||
|
EXPOSE 8080
|
||
|
|
||
|
CMD [ "/main" ]
|