reshape build context to fix out of context error when copying database entities

This commit is contained in:
Ulf Gebhardt 2021-10-09 13:44:37 +02:00
parent d348706f16
commit a35d0dfff4
No known key found for this signature in database
GPG Key ID: 81308EFE29ABFEBD
2 changed files with 6 additions and 3 deletions

View File

@ -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

View File

@ -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