Fix docker

This commit is contained in:
Jan Zípek 2024-03-28 16:12:47 +01:00
parent 8b3c441878
commit 56d8631f30
Signed by: kamen
GPG Key ID: A17882625B33AC31
1 changed files with 7 additions and 4 deletions

View File

@ -13,26 +13,29 @@ COPY server/config/*.go ./config/
COPY server/routes/*.go ./routes/
COPY server/services/*.go ./services/
COPY server/middleware/*.go ./middleware/
COPY server/database ./database/
RUN go build -o /basic-sensor-receiver
RUN mkdir /data
## Build client
FROM node:alpine AS build-client
FROM node:20-alpine AS build-client
WORKDIR /app
COPY client/package.json ./
COPY client/package-lock.json ./
COPY client/yarn.lock ./
COPY client/.yarn/releases ./.yarn/releases
COPY client/.yarnrc.yml ./
RUN npm install
RUN yarn
COPY client/tsconfig.json ./
COPY client/vite.config.js ./
COPY client/src ./src
COPY client/index.html ./
RUN npm run build
RUN yarn build
## Deploy
FROM gcr.io/distroless/base-debian10