diff --git a/backend/Dockerfile b/backend/Dockerfile index 02f772db6..a8554fbb5 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -61,9 +61,9 @@ CMD /bin/sh -c "yarn install && yarn run dev" FROM base as build # Copy everything -COPY . . +COPY ./backend ./ # Also copy external enities from database -COPY ../database/entity/ ../database/entity/ +COPY ./database/entity/ ../database/entity/ # npm install RUN yarn install --production=false --frozen-lockfile --non-interactive # npm build diff --git a/docker-compose.yml b/docker-compose.yml index 15a47111c..b85d155fe 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -54,7 +54,10 @@ services: backend: image: gradido/backend:latest build: - context: ./backend + # since we have to include the entities from ./database we cannot define the context as ./backend + # this might blow build image size to the moon ?! + context: ./ + dockerfile: ./backend/Dockerfile target: production networks: - internal-net